Search code examples
pythonnumpyversionscipyoptparse

Open Source Scientific Project - Use Python 2.6 or 2.7?


I've seen several other topics on whether to use 2.x or 3.x. However, most of these are at least two years old and do not distinguish between 2.6 and 2.7.

I am rebooting a scientific project that I ultimately may want to release by 2013. I make use of numpy, scipy, and pylab, among standard 2.6+ modules like itertools. Which version, 2.6 or 2.7, would be better for this?

This would also clear up whether or not to use optparse when making my scripts.

Edit: I am working at a university and the workstation I picked up had Python 2.4. Picking between 2.6 and 2.7 determines which distro to upgrade to. Thanks for the advice!


Solution

  • If everything you need would work with 2.7 I would use it, no point staying with 2.6. Also, .format() works a bit nicer (no need to specify positions in the {} for the arguments to the formatting directives).

    FWIW, I usually use 2.7 or 3.2 and every once in a while I end up porting some code to my Linux box which still runs 2.6.5 and the format() thing is annoying enough :)

    2.7 has been around enough to be supported well - and 3.x is hopefully getting there too.