Per <pybugs.pho...@safersignup.com> added the comment:

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.

----------
nosy: +phobie
Added file: http://bugs.python.org/file17481/hklm_python_extensions.reg

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue4015>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to