Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitda672b2

Browse files
[3.12] Document PYTHONSAFEPATH along side -P (GH-106122) (#106352)
Document PYTHONSAFEPATH along side -P (GH-106122)(cherry picked from commit0355625)Co-authored-by: Jeremy Paige <ucodery@gmail.com>
1 parentb314194 commitda672b2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

‎Python/initconfig.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ Options (and corresponding environment variables):\n\
4949
.pyc extension; also PYTHONOPTIMIZE=x\n\
5050
-OO : do -O changes and also discard docstrings; add .opt-2 before\n\
5151
.pyc extension\n\
52-
-P : don't prepend a potentially unsafe path to sys.path\n\
52+
-P : don't prepend a potentially unsafe path to sys.path; also PYTHONSAFEPATH\n\
5353
-q : don't print version and copyright messages on interactive startup\n\
5454
-s : don't add user site directory to sys.path; also PYTHONNOUSERSITE\n\
5555
-S : don't imply 'import site' on initialization\n\
@@ -144,7 +144,6 @@ static const char usage_envvars[] =
144144
"PYTHONSTARTUP: file executed on interactive startup (no default)\n"
145145
"PYTHONPATH : '%lc'-separated list of directories prefixed to the\n"
146146
" default module search path. The result is sys.path.\n"
147-
"PYTHONSAFEPATH: don't prepend a potentially unsafe path to sys.path.\n"
148147
"PYTHONHOME : alternate <prefix> directory (or <prefix>%lc<exec_prefix>).\n"
149148
" The default module search path uses %s.\n"
150149
"PYTHONPLATLIBDIR : override sys.platlibdir.\n"
@@ -184,6 +183,7 @@ static const char usage_envvars[] =
184183
" (-X int_max_str_digits=number)\n"
185184
"PYTHONNOUSERSITE : disable user site directory (-s)\n"
186185
"PYTHONOPTIMIZE : enable level 1 optimizations (-O)\n"
186+
"PYTHONSAFEPATH : don't prepend a potentially unsafe path to sys.path (-P)\n"
187187
"PYTHONUNBUFFERED : disable stdout/stderr buffering (-u)\n"
188188
"PYTHONVERBOSE : trace import statements (-v)\n"
189189
"PYTHONWARNINGS=arg : warning control (-W arg)\n";

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp