@@ -187,19 +187,9 @@ arg ...: arguments passed to program in sys.argv[1:]\n\
187
187
188
188
static const char usage_xoptions [] = "\
189
189
The following implementation-specific options are available:\n\
190
- -X faulthandler: enable faulthandler\n\
191
- -X showrefcount: output the total reference count and number of used\n\
192
- memory blocks when the program finishes or after each statement in\n\
193
- the interactive interpreter. This only works on debug builds\n\
194
- -X tracemalloc: start tracing Python memory allocations using the\n\
195
- tracemalloc module. By default, only the most recent frame is stored\n\
196
- in a traceback of a trace. Use -X tracemalloc=NFRAME to start\n\
197
- tracing with a traceback limit of NFRAME frames\n\
198
- -X importtime: show how long each import takes. It shows module name,\n\
199
- cumulative time (including nested imports) and self time (excluding\n\
200
- nested imports). Note that its output may be broken in\n\
201
- multi-threaded application.\n\
202
- Typical usage is python3 -X importtime -c 'import asyncio'\n\
190
+ -X cpu_count=[n|default]: Override the return value of os.cpu_count(),\n\
191
+ os.process_cpu_count(), and multiprocessing.cpu_count(). This can\n\
192
+ help users who need to limit resources in a container.\n\
203
193
-X dev : enable CPython's \"development mode\", introducing additional runtime\n\
204
194
checks which are too expensive to be enabled by default. Effect of\n\
205
195
the developer mode:\n\
@@ -211,12 +201,18 @@ The following implementation-specific options are available:\n\
211
201
* Enable asyncio debug mode\n\
212
202
* Set the dev_mode attribute of sys.flags to True\n\
213
203
* io.IOBase destructor logs close() exceptions\n\
214
- -X utf8: enable UTF-8 mode for operating system interfaces, overriding the\n\
215
- default locale-aware mode. -X utf8=0 explicitly disables UTF-8 mode\n\
216
- (even when it would otherwise activate automatically)\n\
217
- -X pycache_prefix=PATH: enable writing .pyc files to a parallel tree rooted\n\
218
- at the given directory instead of to the code tree\n\
219
- -X warn_default_encoding: enable opt-in EncodingWarning for 'encoding=None'\n\
204
+ -X faulthandler: enable faulthandler\n\
205
+ -X frozen_modules=[on|off]: whether or not frozen modules should be used.\n\
206
+ The default is \"on\" (or \"off\" if you are running a local build).\n\
207
+ -X importtime: show how long each import takes. It shows module name,\n\
208
+ cumulative time (including nested imports) and self time (excluding\n\
209
+ nested imports). Note that its output may be broken in\n\
210
+ multi-threaded application.\n\
211
+ Typical usage is python3 -X importtime -c 'import asyncio'\n\
212
+ -X int_max_str_digits=number: limit the size of int<->str conversions.\n\
213
+ This helps avoid denial of service attacks when parsing untrusted\n\
214
+ data. The default is sys.int_info.default_max_str_digits.\n\
215
+ 0 disables.\n\
220
216
-X no_debug_ranges: disable the inclusion of the tables mapping extra location\n\
221
217
information (end line, start column offset and end column offset) to\n\
222
218
every instruction in code objects. This is useful when smaller code\n\
@@ -227,23 +223,30 @@ The following implementation-specific options are available:\n\
227
223
profiler will be able to report Python calls. This option is only\n\
228
224
available on some platforms and will do nothing if is not supported\n\
229
225
on the current system. The default value is \"off\".\n\
230
- -X frozen_modules=[on|off]: whether or not frozen modules should be used.\n\
231
- The default is \"on\" (or \"off\" if you are running a local build).\n\
232
- -X int_max_str_digits=number: limit the size of int<->str conversions.\n\
233
- This helps avoid denial of service attacks when parsing untrusted\n\
234
- data. The default is sys.int_info.default_max_str_digits.\n\
235
- 0 disables.\n\
236
- -X cpu_count=[n|default]: Override the return value of os.cpu_count(),\n\
237
- os.process_cpu_count(), and multiprocessing.cpu_count(). This can\n\
238
- help users who need to limit resources in a container."
239
- #ifdef Py_STATS
240
- "\n\
241
- -X pystats: Enable pystats collection at startup."
242
- #endif
226
+ "
243
227
#ifdef Py_DEBUG
244
- "\n \
245
- - X presite = package .module : import this module before site .py is run ."
228
+ "-X presite=package.module: import this module before site.py is run.\n"
246
229
#endif
230
+ "\
231
+ - X pycache_prefix = PATH : enable writing .pyc files to a parallel tree rooted \n \
232
+ at the given directory instead of to the code tree \n \
233
+ "
234
+ #ifdef Py_STATS
235
+ "-X pystats: Enable pystats collection at startup.\n"
236
+ #endif
237
+ "\
238
+ -X showrefcount: output the total reference count and number of used\n\
239
+ memory blocks when the program finishes or after each statement in\n\
240
+ the interactive interpreter. This only works on debug builds\n\
241
+ -X tracemalloc: start tracing Python memory allocations using the\n\
242
+ tracemalloc module. By default, only the most recent frame is stored\n\
243
+ in a traceback of a trace. Use -X tracemalloc=NFRAME to start\n\
244
+ tracing with a traceback limit of NFRAME frames\n\
245
+ -X utf8: enable UTF-8 mode for operating system interfaces, overriding the\n\
246
+ default locale-aware mode. -X utf8=0 explicitly disables UTF-8 mode\n\
247
+ (even when it would otherwise activate automatically)\n\
248
+ -X warn_default_encoding: enable opt-in EncodingWarning for 'encoding=None'\
249
+ "
247
250
;
248
251
249
252
/* Envvars that don't have equivalent command-line options are listed first */
@@ -310,16 +313,16 @@ static const char usage_envvars[] =
310
313
" (-X int_max_str_digits=number)\n"
311
314
"PYTHONNOUSERSITE: disable user site directory (-s)\n"
312
315
"PYTHONOPTIMIZE : enable level 1 optimizations (-O)\n"
316
+ #ifdef Py_DEBUG
317
+ "PYTHON_PRESITE=pkg.mod: import this module before site.py is run\n"
318
+ #endif
313
319
"PYTHONSAFEPATH : don 't prepend a potentially unsafe path to sys .path .\n "
314
- "PYTHONUNBUFFERED: disable stdout/stderr buffering (-u)\n"
315
- "PYTHONVERBOSE : trace import statements (-v)\n"
316
- "PYTHONWARNINGS=arg: warning control (-W arg)\n"
317
320
#ifdef Py_STATS
318
321
"PYTHONSTATS : turns on statistics gathering \n "
319
322
#endif
320
- #ifdef Py_DEBUG
321
- "PYTHON_PRESITE=pkg.mod: import this module before site.py is run \n"
322
- #endif
323
+ "PYTHONUNBUFFERED: disable stdout/stderr buffering (-u)\n"
324
+ "PYTHONVERBOSE : trace import statements (-v) \n"
325
+ "PYTHONWARNINGS=arg: warning control (-W arg)\n"
323
326
;
324
327
325
328
#if defined(MS_WINDOWS )