[issue4015] [patch] make installed scripts executable on windows
Amaury Forgeot d'Arc
report at bugs.python.org
Wed Apr 1 17:10:23 CEST 2009
Amaury Forgeot d'Arc <amauryfa at 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 <report at bugs.python.org>
<http://bugs.python.org/issue4015>
_______________________________________
More information about the Python-bugs-list
mailing list