Message106671
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. |
|
Date |
User |
Action |
Args |
2010-05-28 13:52:05 | phobie | set | recipients:
+ phobie, mhammond, terry.reedy, amaury.forgeotdarc, ggenellina, techtonik, tarek, jmfauth, ssbarnea, bebac, asvetlov |
2010-05-28 13:52:04 | phobie | set | messageid: <1275054724.93.0.37330555006.issue4015@psf.upfronthosting.co.za> |
2010-05-28 13:52:03 | phobie | link | issue4015 messages |
2010-05-28 13:52:03 | phobie | create | |
|