Amaury Forgeot d'Arc <amaur...@gmail.com> added the comment:

I agree.
In any case, double-clicking on a .py file should start an "installed"
interpreter, that is one listed in the registry:
HKEY_LOCAL_MACHINE\SOFTWARE\Python\PythonCore\X.Y\InstallPath

Today starting a .py file only open the last installed Python interpreter.
With this proposal, the launcher choose the "best" installed interpreter
for the given script, and falls back to the last installed one.

There may be different definitions of "best". The algorithm could look
like this:
- if the first line is
    #! c:/some/path/to/python.exe
  and the registry contains an installation with 
    InstallPath="c:/some/path/to"
  choose this one.
- if the first line matches
    #! c:/python/([1-9])([0-9])/python.exe
  and if the following registry key exists:
    HKEY_LOCAL_MACHINE/SOFTWARE/Python/PythonCore/\1.\2/InstallPath
  choose this one.
- else, use the last installed interpreter.

----------

_______________________________________
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