[issue18491] Add "exe wrapper" functionality to Windows launcher

Tim Golden report at bugs.python.org
Fri Jul 19 09:53:32 CEST 2013


Tim Golden added the comment:

Glancing back, it isn't perhaps clear to the casual reader what's being proposed here, and why. The idea is that a pip-style installer become part of core Python. For Windows users, any standalone scripts from an installed package would be placed in scripts/ with a stub .exe which is a copy of the py.exe launcher which would launch the corresponding Python file.

So, for a package Foo with a run-foo script, there would be: scripts/run-foo-script.py and scripts/run-foo.exe. The latter is a copy of the PEP397 launcher which interrogates its own filename (run-foo.exe) and looks for a corresponding Python script (run-foo-script.py) and then uses the launcher mechanics to run it, making use of all the built-in shebang-handling, command-line switches, etc.

This patch allows the py.exe launcher to be used in either way, transparently, inserting the run-foo-script.py filepath as a first parameter before the rest of the code runs.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18491>
_______________________________________


More information about the Python-bugs-list mailing list