Software Compatable with other versions?

M

Michael Yanowitz

Hello:

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

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?

Thanks in advance:
Michael Yanowitz
 
G

georgeryoung

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.
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?

Very unlikely.
-- George Young
 
L

Laurent Pointal

(e-mail address removed) a écrit :
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.

The magic code.

Just rm -rf *.pyc from your own scripts directories, they will be rebuilt.

A+

Laurent.
 
G

Georg Brandl

Michael said:
Hello:

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

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?

No. Why should there if there's such an easy way to build it
from scratch?

Georg
 
T

Tim Chase

I have been told that the .pyc are not compatable. Is it
The magic code.

Just rm -rf *.pyc from your own scripts directories, they will
be rebuilt.

Just take care in the event that you have files that were
distributed in bytecode format (.pyc) rather than source
form...if you don't have any such .pyc files, then Laurent's
solution is fast and easy. If you do, you may have to protect
them before trying such a stunt.

-tkc
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,899
Latest member
RodneyMcAu

Latest Threads

Top