Skip to content

Commit 757d76b

Browse files
committed
Manpage: Some formatting in the -X options
1 parent 8548c32 commit 757d76b

1 file changed

Lines changed: 42 additions & 35 deletions

File tree

Misc/python.man

Lines changed: 42 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -321,69 +321,76 @@ a regular expression on the warning message.
321321
.BI "\-X " option
322322
Set implementation-specific option. The following options are available:
323323

324-
-X cpu_count=N: override the return value of os.cpu_count();
325-
-X cpu_count=default cancels overriding; also PYTHON_CPU_COUNT
326-
327-
-X dev: enable CPython's "development mode", introducing additional runtime
328-
checks which are too expensive to be enabled by default. It will not be
329-
more verbose than the default if the code is correct: new warnings are
330-
only emitted when an issue is detected. Effect of the developer mode:
331-
* Add default warning filter, as -W default
332-
* Install debug hooks on memory allocators: see the PyMem_SetupDebugHooks()
333-
C function
334-
* Enable the faulthandler module to dump the Python traceback on a crash
324+
\fB-X cpu_count=\fIN\fR: override the return value of \fIos.cpu_count()\fR;
325+
\fB-X cpu_count=default\fR cancels overriding; also \fBPYTHON_CPU_COUNT\fI
326+
327+
\fB-X dev\fR: enable CPython's "development mode", introducing additional
328+
runtime checks which are too expensive to be enabled by default. It
329+
will not be more verbose than the default if the code is correct: new
330+
warnings are only emitted when an issue is detected. Effect of the
331+
developer mode:
332+
* Add default warning filter, as \fB-W default\fR
333+
* Install debug hooks on memory allocators: see the
334+
PyMem_SetupDebugHooks() C function
335+
* Enable the faulthandler module to dump the Python traceback on a
336+
crash
335337
* Enable asyncio debug mode
336338
* Set the dev_mode attribute of sys.flags to True
337339
* io.IOBase destructor logs close() exceptions
338340

339-
-X importtime: show how long each import takes. It shows module name,
341+
\fB-X importtime\fR: show how long each import takes. It shows module name,
340342
cumulative time (including nested imports) and self time (excluding
341343
nested imports). Note that its output may be broken in multi-threaded
342-
application. Typical usage is python3 -X importtime -c 'import asyncio'
344+
application. Typical usage is
345+
\fBpython3 -X importtime -c 'import asyncio'\fR
343346

344-
-X faulthandler: enable faulthandler
347+
\fB-X faulthandler\fR: enable faulthandler
345348

346-
-X frozen_modules=[on|off]: whether or not frozen modules should be used.
349+
\fB-X frozen_modules=\fR[\fBon\fR|\fBoff\fR]: whether or not frozen modules
350+
should be used.
347351
The default is "on" (or "off" if you are running a local build).
348352

349-
-X gil=[0|1]: enable (1) or disable (0) the GIL; also PYTHON_GIL
350-
Only available in builds configured with --disable-gil.
353+
\fB-X gil=\fR[\fB0\fR|\fB1\fR]: enable (1) or disable (0) the GIL; also
354+
\fBPYTHON_GIL\fR
355+
Only available in builds configured with \fB--disable-gil\fR.
351356

352-
-X int_max_str_digits=number: limit the size of int<->str conversions.
357+
\fB-X int_max_str_digits=\fInumber\fR: limit the size of int<->str conversions.
353358
This helps avoid denial of service attacks when parsing untrusted data.
354359
The default is sys.int_info.default_max_str_digits. 0 disables.
355360

356-
-X no_debug_ranges: disable the inclusion of the tables mapping extra location
357-
information (end line, start column offset and end column offset) to every
358-
instruction in code objects. This is useful when smaller code objects and pyc
359-
files are desired as well as suppressing the extra visual location indicators
360-
when the interpreter displays tracebacks.
361+
\fB-X no_debug_ranges\fR: disable the inclusion of the tables mapping extra
362+
location information (end line, start column offset and end column
363+
offset) to every instruction in code objects. This is useful when
364+
smaller code objects and pyc files are desired as well as suppressing
365+
the extra visual location indicators when the interpreter displays
366+
tracebacks.
361367

362-
-X perf: support the Linux "perf" profiler; also PYTHONPERFSUPPORT=1
368+
\fB-X perf\fR: support the Linux "perf" profiler; also \fBPYTHONPERFSUPPORT=1\fR
363369

364-
-X perf_jit: support the Linux "perf" profiler with DWARF support;
365-
also PYTHON_PERF_JIT_SUPPORT=1
370+
\fB-X perf_jit\fR: support the Linux "perf" profiler with DWARF support;
371+
also \fBPYTHON_PERF_JIT_SUPPORT=1\fR
366372

367-
-X presite=MOD: import this module before site; also PYTHON_PRESITE
373+
\fB-X presite=\fIMOD\fR: import this module before site; also \fBPYTHON_PRESITE\fR
368374
This only works on debug builds.
369375

370-
-X pycache_prefix=PATH: enable writing .pyc files to a parallel tree rooted at the
371-
given directory instead of to the code tree.
376+
\fB-X pycache_prefix=\fIPATH\fR: enable writing .pyc files to a parallel
377+
tree rooted at the given directory instead of to the code tree.
372378

373-
-X showrefcount: output the total reference count and number of used
379+
\fB-X showrefcount\fR: output the total reference count and number of used
374380
memory blocks when the program finishes or after each statement in the
375381
interactive interpreter. This only works on debug builds
376382

377-
-X tracemalloc: start tracing Python memory allocations using the
383+
\fB-X tracemalloc\fR: start tracing Python memory allocations using the
378384
tracemalloc module. By default, only the most recent frame is stored in a
379385
traceback of a trace. Use -X tracemalloc=NFRAME to start tracing with a
380386
traceback limit of NFRAME frames
381387

382-
-X utf8: enable UTF-8 mode for operating system interfaces, overriding the default
383-
locale-aware mode. -X utf8=0 explicitly disables UTF-8 mode (even when it would
384-
otherwise activate automatically). See PYTHONUTF8 for more details
388+
\fB-X utf8\fR: enable UTF-8 mode for operating system interfaces,
389+
overriding the default locale-aware mode. \fB-X utf8=0\fR explicitly
390+
disables UTF-8 mode (even when it would otherwise activate
391+
automatically). See \fBPYTHONUTF8\fR for more details
385392

386-
-X warn_default_encoding: enable opt-in EncodingWarning for 'encoding=None'
393+
\fB-X warn_default_encoding\fR: enable opt-in EncodingWarning for 'encoding=None'
387394

388395
.TP
389396
.B \-x

0 commit comments

Comments
 (0)