Monthly Archives: August 2014

Installing Python2.6 in a virtual environment

Tweet 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 … Continue reading

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

Installation of Python 2.6 error fixed

Tweet 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:

If you are lucky, everything is smooth and you … Continue reading

Posted in Python | Tagged , | 4 Comments

Installing another Python version into virtualenv

Tweet 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 … Continue reading

Posted in Python, Software development | Tagged | 2 Comments

How to add badges in your pypi project

Tweet 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 … Continue reading

Posted in Uncategorized | 1 Comment

New software on pypi: pypiview

Tweet I’ve moved an old code into a new Pypi package and took the opportunity to play around with the badges. The new package called pypiview is now available on pypi. It allows one to easily look at the number … Continue reading

Posted in Software development | Tagged , , | Leave a comment

Migrating from a Subversion repository to GitHub

Tweet 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 … Continue reading

Posted in Uncategorized | Leave a comment

How to calculate mean in AWK

Tweet 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:

Using the awk tool … Continue reading

Posted in Linux | Tagged | Leave a comment

How to send svn diff to meld

Tweet 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 … Continue reading

Posted in Linux | Tagged , | 3 Comments

Python function chmod to change permission

Tweet I naively tried the function chmod from the standard python module called os to change the permission of a file:

Checking in the unix command line (ls -l), I got an unexpected result:

I expected indeed a … Continue reading

Posted in Python | Tagged | 2 Comments