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!
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.
If you intend to distribute this code, your answer depends on your target audience, actually. A recent stint in some private sector research lab showed me that Python 2.5 is still often use.
Another example: EnSight, a commercial package for 3D visualization/manipulation, ships with Python 2.5 (and NumPy 1.3 or 1.4, if I'm not mistaken).
For a personal project, I'd shoot for 2.7. For a larger audience, I'd err towards 2.6.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With