I've written my code to target Python 2.6.5, but I now need to run it on a cluster that only has 2.5.4, something that wasn't on the horizon when I wrote the code. Backporting the code to 2.5 shouldn't be too hard, but I was wondering if there was either a cheat-sheet or an automated tool that would help me with this. For some things, like the with
statement, the right __future__
imports will do the trick, but not for some other things.
views:
100answers:
2
+7
A:
Have you read the What's New in Python 2.6 document? It describes the 2.5->2.6 direction, but you should be able to figure out the reverse from it.
As far as I know, there are no automated tools for 2.6 to 2.5. The only tool I know of is the 2to3 app for going to Python 3.
Mike DeSimone
2010-10-07 13:19:24
Thanks for the answer. I just ended up installing my own Python in my home directory though.
Chinmay Kanchi
2010-10-07 13:40:30