Monthly Archives: August 2014

Installing Python2.6 in a virtual environment

First, install python2.6 executable. see previous post if you have issues when compiling (gcc not found). Make sure you have installed python-dev with apt-get or yum. Then, following the instructions on the same topic but for Python 3 in a … Continue reading

Posted in Python, Software development | Tagged , | 2 Comments

Installation of Python 2.6 error fixed

I wanted to install python2.6 in a virtual environment. The first step was to compile python 2.6 executable from the source code. Once the source are extracted, just type: ./configure –prefix=<PATH_WHERE_TO_INSTALL> make./configure –prefix=<PATH_WHERE_TO_INSTALL> make If you are lucky, everything is … Continue reading

Posted in Python | Tagged , | 11 Comments

Installing another Python version into virtualenv

The idea is that we do not want to install a new version of Python on the system (e.g., for testing purpose), which may interfere with your entire distribution. Instead, we want to create a virtual environment with virtualenv tool. … Continue reading

Posted in Python, Software development | Tagged | 6 Comments

How to add badges in your pypi project

1. pypi badge To get the pypi badge, go to https://badge.fury.io/for/py page and enter the name of a valid package. Select the code you’d like to insert into your documentation (e.g., RST) and you check get a image like this: … Continue reading

Posted in Python | 3 Comments

Migrating from a Subversion repository to GitHub

I’ve just moved a SVN repository to github. I was a bit afraid of spending time and lost the history but fortunately, I came upon this great post http://www.samaxes.com/2013/11/move-from-svn-to-git/ , followed the instructions and it worked almost like a charm. … Continue reading

Posted in Uncategorized | Leave a comment

How to calculate mean in AWK

Another trick with awk to compute mean of a column. Imagine that you have a file with many lines and you want to compute the mean of the fourth item on each line. E.g: Lowest value found .2 Lowest value … Continue reading

Posted in Linux | Tagged | Leave a comment

How to send svn diff to meld

On one hand meld provides a nice GUI to visualise the differences between 2 files. On the other hand, with SVN diff command, you can obtain the differences between 2 versions of the same file so you end up with … Continue reading

Posted in Linux | Tagged , | 7 Comments

Python function chmod to change permission

I naively tried the function chmod from the standard python module called os to change the permission of a file: os.chmod(filename, 644)os.chmod(filename, 644) Checking in the unix command line (ls -l), I got an unexpected result: –w—-r-T.–w—-r-T. I expected indeed … Continue reading

Posted in Python | Tagged | 2 Comments