On approximately 12/1/2008 11:05 PM, came the following characters from the keyboard of Martin v. Löwis:
Is there some way to specify a default version in such a way that it can
be changed as necessary?

What do you mean by "default version"?

There is the version that is associated with the .py/.pyc extensions
at any point in time; you can change these by re-running the respective
installers from add-and-remove-programs. In a well-managed installation,
only one Python installation would have the "Register Extensions"
feature selected; to then change the default, one would unselect the
feature in one version, and reselect it in a different. If only the
default installation procedure was ever used, re-running the installer
in "Repair" mode (from ARP) will also restore the extension
associations.

That seems a lot more cumbersome than just using the command line to change the ftype and assoc a bit. Here's how I set up my computer, for multiple versions. Now to change the "default", I just use the assoc command to change the association for .py to one of the three listed ftypes. Simple and quick.

c:\>ftype Python25.File
ftype Python25.File
Python25.File="C:\Python25\python.exe" "%1" %*

c:\>ftype Python26.File
ftype Python26.File
Python26.File="C:\Python26\python.exe" "%1" %*

c:\>ftype Python30.File
ftype Python30.File
Python30.File="C:\Python30\python.exe" "%1" %*

c:\>assoc .py
assoc .py
.py=Python25.File


It would be nice if the ftypes were version specific as created by the installer; IIRC, I created the above three from the ftype Python.File as I installed each version.

--
Glenn -- http://nevcal.com/
===========================
A protocol is complete when there is nothing left to remove.
-- Stuart Cheshire, Apple Computer, regarding Zero Configuration Networking

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to