summaryrefslogtreecommitdiffstats
path: root/Doc/using
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-10-31 21:31:26 (GMT)
committerGitHub <noreply@github.com>2022-10-31 21:31:26 (GMT)
commit46a3cf4fe3380b5d4560589cce8f602ba949832d (patch)
treed4c9935b59a1a18bb370d081c1e3907345fc6984 /Doc/using
parent2b0cbb90c311ccfed291c3b0f4f8268fdac214ee (diff)
downloadcpython-46a3cf4fe3380b5d4560589cce8f602ba949832d.zip
cpython-46a3cf4fe3380b5d4560589cce8f602ba949832d.tar.gz
cpython-46a3cf4fe3380b5d4560589cce8f602ba949832d.tar.bz2
gh-98692: Enable treating shebang lines as executables in py.exe launcher (GH-98732)
(cherry picked from commit 88297e2a8a75898228360ee369628a4a6111e2ee) Co-authored-by: Steve Dower <steve.dower@python.org>
Diffstat (limited to 'Doc/using')
-rw-r--r--Doc/using/windows.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/Doc/using/windows.rst b/Doc/using/windows.rst
index 4ab68e1..4526dc3 100644
--- a/Doc/using/windows.rst
+++ b/Doc/using/windows.rst
@@ -853,7 +853,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
@@ -863,6 +862,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
--------------------------