8000 gh-98692: Enable treating shebang lines as executables in py.exe launcher by zooba · Pull Request #98732 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-98692: Enable treating shebang lines as executables in py.exe launcher #98732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Oct 31, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Docs
  • Loading branch information
zooba committed Oct 27, 2022
commit 7ef68bbb0991aceef43f948a6f62c44e8e23c80b
8 changes: 7 additions & 1 deletion Doc/using/windows.rst
Original file line number Diff line number Diff line change
Expand Up @@ -866,7 +866,6 @@ minor version. I.e. ``/usr/bin/python3.7-32`` will request usage of the
not provably i386/32-bit". To request a specific environment, use the new
``-V:<TAG>`` argument with the complete tag.


The ``/usr/bin/env`` form of shebang line has one further special property.
Before looking for installed Python interpreters, this form will search the
executable :envvar:`PATH` for a Python executable. This corresponds to the
Expand All @@ -876,6 +875,13 @@ be found, it will be handled as described below. Additionally, the environment
variable :envvar:`PYLAUNCHER_NO_SEARCH_PATH` may be set (to any value) to skip
this additional search.

Shebang lines that do not match any of these patterns are treated as **Windows**
paths that are absolute or relative to the directory containing the script file.
This is a convenience for Windows-only scripts, such as those generated by an
installer, since the behavior is not compatible with Unix-style shells.
These paths may be quoted, and may include multiple arguments, after which the
path to the script and any additional arguments will be appended.


Arguments in shebang lines
--------------------------
Expand Down
0