Proper set-up for a co-existant python 2.6 & 3.1 installation

vsoler vicente.soler at gmail.com
Mon Aug 23 18:15:26 EDT 2010


I started learning python with ver 2.6.  Then I switched to 3.1 after
uninstalling the previous version.

Now I find that many of the code snippets that I would need are
written for py 2.6. Sometimes the automatic converter 2to3 doesn't
help, because it is not able to complete its objective and request
manual "tuning" from the user.

This is to tell you that I would like to have both versions running on
my PC. I am using Windows 7 at home, and Windows Vista in the office.

Right now, the two versions are installed on the PC I have at home. If
I go to the directory C:\python26 or C:\python31 and I type "python",
the correct version of python is launched. I need the pywin32
extensions in either case.

I was about to feel happy that everything worked when I found that I
cannot change the file associations.

If I want to work with py 3.1, I want that a double click on a *.py
file launches python 3.1, and not 2.6.
On the other hand, when I pan to work with py 2.6 I want that a double
click on a*.py file launches python 3.1.

I keep source files (*.py) for either version in different
directories.

I tried to change file associations, first manually, in a CMD window.
But the system was responding "access denied" even when I used an
Administrator account (I was using FTYPE python.file="C:
\Python26\python.exe" "%1" %*).

So I directed my efforts towards the Control Panel. But here I got
lost. I am not able to find the python file associations (I can find
others, but not python's).

Perhaps I am focussing my efforts in the wrong direction, but I am not
aware of any alternative one.

Perhaps you can help me.

Thank you
Vicente Soler



More information about the Python-list mailing list