Multiple versions

Tim Golden tim.golden at viacom-outdoor.co.uk
Tue Nov 29 03:18:36 EST 2005


(Just to keep things readable, I've reordered the
posts top-to-bottom chronologically. And "Me" is the
cognomen of the original poster, not simply a redundant personal
pronoun!)

[Me]
> I need to install both 2.3 and 2.4 on my Win2000 system. 
> Can someone please
> give me a pointer as to how to do this? Thanks!

[Tim Golden]
> ... The simple answer is: just install
> them (in different directories, eg c:\python23, 
> c:\python24), installing last the one which 
> you want your .py/.pyw files to be associated with.

[Me]
> Thank you for your reply! Is there a simple way to 
> change the .py/.pyw associations? Like a registry 
> setting I can "toggle"? Or are there lots of other 
> things involved, system directory libraries etcetera?

Assuming that you're not doing anything fancy with
system or Python paths -- and I guess from the tenor
of your questions that you're not -- then it's just
the same as changing any other file association on
Windows. There was a thread on this subject fairly
recently, but in essence you can either use the
File Associations tab on Explorer (on XP it's
under Tools > Folder Options > File Types) or
you can use the command line equivalent:

FTYPE Python.File="C:\Python24\python.exe" "%1" %*

replacing c:\python24 by whatever is appropriate.

If you really wanted to do things which involved
testing your programs against different versions
of Python, which I imagine might be your aim, then
you probably want either to write some sort of batch
file wrapper (search c.l.py for some examples of this
in the past) or to use a MoveablePython installation:

http://www.voidspace.org.uk/python/movpy/

which is designed for this kind of things (according
to their introduction).

TJG

________________________________________________________________________
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________



More information about the Python-list mailing list