This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author phobie
Recipients amaury.forgeotdarc, asvetlov, bebac, ggenellina, jmfauth, mhammond, phobie, ssbarnea, tarek, techtonik, terry.reedy
Date 2010-05-28.13:52:02
SpamBayes Score 0.00017974582
Marked as misclassified No
Message-id <1275054724.93.0.37330555006.issue4015@psf.upfronthosting.co.za>
In-reply-to
Content
On POSIX the interpreter will be read from the first line of a file.
On Windows the interpreter will be read from the Registry HKEY_CLASSES_ROOT\.<file-extension> .

So the correct way to associate a interpreter to a file is to invent a file-extension for every interpreter.
Like /usr/bin/python /usr/bin/python3 and /usr/bin/python3.1 on POSIX, there should be .py .py3 and .py31 on Windows!

I attached a example-registry-patch to register extensions for 2.5, 2.6 and 3.1 .
If you want to use it, you need to adjust the paths!

I propose to change all Python-Windows-installer to install versioned extensions.

If you want a switcher application, it should read the first line of the script and match it against ".*/python(.*)$". So the default POSIX "#!/usr/bin/python3.1" can be kept unchanged. With that rexex the app-path can be read from "HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\<regex-match>\InstallPath\".

BTW.
It would be nice if Python would call itself "Python 3.1" instead of "python" in the "Open with..."-list! The current naming is problematic if you install more than one Python version.
History
Date User Action Args
2010-05-28 13:52:05phobiesetrecipients: + phobie, mhammond, terry.reedy, amaury.forgeotdarc, ggenellina, techtonik, tarek, jmfauth, ssbarnea, bebac, asvetlov
2010-05-28 13:52:04phobiesetmessageid: <1275054724.93.0.37330555006.issue4015@psf.upfronthosting.co.za>
2010-05-28 13:52:03phobielinkissue4015 messages
2010-05-28 13:52:03phobiecreate