As the name suggests, it is a Python environment which is isolated from other python environments. This kind of environment is really handy when you are working on multiple projects but you don’t want to affect other project environments. Advantages of virtual environment. Isolated environment: It creates a self-contained Python instance. Whatever Python packages are […]

, ,

We often need command to recursively delete files from the current and sub-directories. Most of us execute the following command to do so. But to our utter surprise we find that it does not delete files from sub-directories. Well “r” option works only when you want to delete the directory. Use the following command to […]

,

Programmatically sending an email is really a good tool for developer’s paraphernalia. This is really handy when one automates task and wants to get notified by an email for success or failure. Lately I have written Python script to automate some jobs and incorporated method to send email notification. I thought to share this simple […]

, ,

Sometimes it’s require to install python2.7 on Ubuntu 10.04 which has python2.6 pre-installed, because some of the libraries are not compatible with python2.6 and they can work well if system has python2.7. If you try to replace 2.6 with 2.7 some of the system script might break. To avoid such scenario you generally have both […]

, ,

I had used MySQLdb in past to interface with MySQL database. Most of the time I had used cursorclass=MySQLdb.cursors.DictCursor for getting the result as dictionary but today I wanted to get the results in tuples so I used cursorclass=MySQLdb.cursors.CursorTupleRowsMixIn. But when I execute it, it failed and complained about cursor() method call. The exception is […]

, , ,

In code development, be it one or the other requirement, we need to access the environment variable. In this post, the environment variable will be read/set in 5 different programming languages. C language In C, environment variables can be read and set by getenv() and putevn() methods respectively. The example code is shown below. Java […]

, , ,