More Python versions on an XP machine

G

Gabor Urban

Hi guys,

this a very MS specific question. I do use a rather old Python
version, because we have a couple of applications written for that.
Porting them to a newer Python is not allowed by the bosses. Now we
will start a new project with latest stable Python. Can I have them
both on my computer, and how should I do that.

Thanks,

PS: This is my computer at the office.... :)
 
D

Diez B. Roggisch

Gabor said:
Hi guys,

this a very MS specific question. I do use a rather old Python
version, because we have a couple of applications written for that.
Porting them to a newer Python is not allowed by the bosses. Now we
will start a new project with latest stable Python. Can I have them
both on my computer, and how should I do that.

As numerous posts here have indicated over the past years, and even this
week - and to say it with a somewhate prematurely awarded Nobel Prize
Winner:

YES, YOU CAN!

Diez
 
D

DreiJane

Hi,

there are several ways to do that besides starting python scripts
with a double-click on a desktop icon (that can only work with the
one and only python version of the registry).

One is to start the new python version directly from a "DosBox".
You could copy python.exe or pythonw.exe from the new version
directly into the directory, where your python script is - both are
only some kB large - and then execute "python your_script" in the
cmd.exe. After some "cd"s to the directory of your script. Besides -
it is no bad idea to have some copies of the cmd.exe at several
places of your file system - the correct run of cmd.exe is not
depending on its place in C:\Windows\system32. It also runs from
external disks.

This is, how i do that, not optimal probably, but easy to understand.

Joost
 
N

Nobody

this a very MS specific question. I do use a rather old Python
version, because we have a couple of applications written for that.
Porting them to a newer Python is not allowed by the bosses. Now we
will start a new project with latest stable Python. Can I have them
both on my computer, and how should I do that.

You can have multiple versions, but you can only associate one specific
version with the ".py" suffix.

This matters if you need to be able to execute .py files as if they
were executables, e.g. double-clicking on the script in Explorer or
typing the script's name in the command prompt.

You can run scripts which use other versions of Python by specifying the
interpreter explicitly, e.g.:

"C:\Program Files\Python25\python.exe" "C:\Program Files\MyApp\myscript.py"
 

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

Forum statistics

Threads
473,774
Messages
2,569,596
Members
45,141
Latest member
BlissKeto
Top