Skip to content

Commit

Permalink
Document PYTHONSAFEPATH along side -P (pythonGH-106122)
Browse files Browse the repository at this point in the history
(cherry picked from commit 0355625)

Co-authored-by: Jeremy Paige <ucodery@gmail.com>
  • Loading branch information
ucodery authored and miss-islington committed Jul 3, 2023
1 parent 5e85604 commit c6dc7a8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Python/initconfig.c
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ Options (and corresponding environment variables):\n\
.pyc extension; also PYTHONOPTIMIZE=x\n\
-OO : do -O changes and also discard docstrings; add .opt-2 before\n\
.pyc extension\n\
-P : don't prepend a potentially unsafe path to sys.path\n\
-P : don't prepend a potentially unsafe path to sys.path; also PYTHONSAFEPATH\n\
-q : don't print version and copyright messages on interactive startup\n\
-s : don't add user site directory to sys.path; also PYTHONNOUSERSITE\n\
-S : don't imply 'import site' on initialization\n\
Expand Down Expand Up @@ -144,7 +144,6 @@ static const char usage_envvars[] =
"PYTHONSTARTUP: file executed on interactive startup (no default)\n"
"PYTHONPATH : '%lc'-separated list of directories prefixed to the\n"
" default module search path. The result is sys.path.\n"
"PYTHONSAFEPATH: don't prepend a potentially unsafe path to sys.path.\n"
"PYTHONHOME : alternate <prefix> directory (or <prefix>%lc<exec_prefix>).\n"
" The default module search path uses %s.\n"
"PYTHONPLATLIBDIR : override sys.platlibdir.\n"
Expand Down Expand Up @@ -184,6 +183,7 @@ static const char usage_envvars[] =
" (-X int_max_str_digits=number)\n"
"PYTHONNOUSERSITE : disable user site directory (-s)\n"
"PYTHONOPTIMIZE : enable level 1 optimizations (-O)\n"
"PYTHONSAFEPATH : don't prepend a potentially unsafe path to sys.path (-P)\n"
"PYTHONUNBUFFERED : disable stdout/stderr buffering (-u)\n"
"PYTHONVERBOSE : trace import statements (-v)\n"
"PYTHONWARNINGS=arg : warning control (-W arg)\n";
Expand Down

0 comments on commit c6dc7a8

Please sign in to comment.