summaryrefslogtreecommitdiffstats
path: root/PC/launcher.c
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2020-06-15 16:56:40 (GMT)
committerGitHub <noreply@github.com>2020-06-15 16:56:40 (GMT)
commit2ad799fc761844551da64130a37aba4ace80f53e (patch)
treeb6a9c032f30c62d2f774fe899adf14ae9bcd2649 /PC/launcher.c
parentb87453f94fd391e6700eb25dd91de2e56aeeb98f (diff)
downloadcpython-2ad799fc761844551da64130a37aba4ace80f53e.zip
cpython-2ad799fc761844551da64130a37aba4ace80f53e.tar.gz
cpython-2ad799fc761844551da64130a37aba4ace80f53e.tar.bz2
bpo-37556 Extend help to include latest overrides (GH-14701)
Modify the help in cpython/PC/launcher.c to show users that "latest" can be overridden by shebang, PY_PYTHON[n] or py.ini files. Also show that script [args] is optional by enclosing in square brackets. Automerge-Triggered-By: @zooba (cherry picked from commit b3e6783423f58597419abae343dd1d5dcc02a7e3) Co-authored-by: Steve (Gadget) Barnes <gadgetsteve@live.co.uk>
Diffstat (limited to 'PC/launcher.c')
-rw-r--r--PC/launcher.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/PC/launcher.c b/PC/launcher.c
index fd5ad0a..106fc66 100644
--- a/PC/launcher.c
+++ b/PC/launcher.c
@@ -1520,7 +1520,7 @@ show_help_text(wchar_t ** argv)
Python Launcher for Windows Version %ls\n\n", version_text);
fwprintf(stdout, L"\
usage:\n\
-%ls [launcher-args] [python-args] script [script-args]\n\n", argv[0]);
+%ls [launcher-args] [python-args] [script [script-args]]\n\n", argv[0]);
fputws(L"\
Launcher arguments:\n\n\
-2 : Launch the latest Python 2.x version\n\
@@ -1536,6 +1536,15 @@ Launcher arguments:\n\n\
}
fputws(L"\n-0 --list : List the available pythons", stdout);
fputws(L"\n-0p --list-paths : List with paths", stdout);
+ fputws(L"\n\n If no script is specified the specified interpreter is opened.", stdout);
+ fputws(L"\nIf an exact version is not given, using the latest version can be overridden by", stdout);
+ fputws(L"\nany of the following, (in priority order):", stdout);
+ fputws(L"\n An active virtual environment", stdout);
+ fputws(L"\n A shebang line in the script (if present)", stdout);
+ fputws(L"\n With -2 or -3 flag a matching PY_PYTHON2 or PY_PYTHON3 Enviroment variable", stdout);
+ fputws(L"\n A PY_PYTHON Enviroment variable", stdout);
+ fputws(L"\n From [defaults] in py.ini in your %LOCALAPPDATA%\\py.ini", stdout);
+ fputws(L"\n From [defaults] in py.ini beside py.exe (use `where py` to locate)", stdout);
fputws(L"\n\nThe following help text is from Python:\n\n", stdout);
fflush(stdout);
}