Software Compatable with other versions?
Laurent Pointal
laurent.pointal at limsi.fr
Tue Nov 21 10:56:18 EST 2006
georgeryoung at gmail.com a écrit :
> On Nov 21, 7:24 am, "Michael Yanowitz" <m.yanow... at kearfott.com> wrote:
>> I am still using Python 2.4.3, I haven't upgraded yet.
>> However, I would like to know if my 2.4.3 programs will run
>> in 2.5 without modification.
>> Is there any way to test that my software is compatable
>> with 2.5 (or any other version), without actually installing
>> that version?:
> You need to install 2.5. If you're on linux or similar OS, get the
> source and
> do
> ./configure
> make altinstall
> This installs almost everything, but does not overwrite your link to
> 2.4.3.
>
> Then you can test your code using
> python2.5 myfile.py
>
> When you're all set, just change the link "python" to point to the new
> python2.5.
Hum, IMHO it's a bad idea to change the python link to another Python
version (other than de distro default).
Can put the Python version in script header (and make it executable)
#!/bin/env python2.5
Can write a small script shell starting the Python script with the
ad-hoc Python version.
>> I have been told that the .pyc are not compatable. Is it
>> possible, to convert a 2.4.x .pyc to a 2.5 .pyc?
The magic code.
Just rm -rf *.pyc from your own scripts directories, they will be rebuilt.
A+
Laurent.
More information about the Python-list
mailing list