chunk_id
large_stringlengths
36
36
doc_type
large_stringclasses
2 values
category
large_stringclasses
17 values
document
large_stringclasses
50 values
version_raw
large_stringclasses
590 values
chunk_index
int64
0
262
text
large_stringlengths
11
5.69k
file_path
large_stringclasses
882 values
432c5101-c983-579a-9757-e9e90828ad65
docs
python
python_cmdline
312
38
[`SIGILL`](../library/signal.html#signal.SIGILL "signal.SIGILL") signals to dump the Python traceback. This is equivalent to [`-X`](#cmdoption-X) `faulthandler` option. Added in version 3.3. PYTHONTRACEMALLOC[¶](#envvar-PYTHONTRACEMALLOC "Link to this definition") : If this environment variable is set t...
large_dataset/raw/docs/python/cmdline/cmdline_312.md
ce351e5a-b285-578d-84c1-bf819017603c
docs
python
python_cmdline
312
39
: If this environment variable is set to a non-empty string, Python will show how long each import takes. This is equivalent to setting the [`-X`](#cmdoption-X) `importtime` option. Added in version 3.7. PYTHONASYNCIODEBUG[¶](#envvar-PYTHONASYNCIODEBUG "Link to this definition") : If this environment ...
large_dataset/raw/docs/python/cmdline/cmdline_312.md
06917b95-486e-58c2-b9ec-c3294135d522
docs
python
python_cmdline
312
40
for all domains ([`PYMEM_DOMAIN_RAW`](../c-api/memory.html#c.PYMEM_DOMAIN_RAW "PYMEM_DOMAIN_RAW"), [`PYMEM_DOMAIN_MEM`](../c-api/memory.html#c.PYMEM_DOMAIN_MEM "PYMEM_DOMAIN_MEM"), [`PYMEM_DOMAIN_OBJ`](../c-api/memory.html#c.PYMEM_DOMAIN_OBJ "PYMEM_DOMAIN_OBJ")). * `pymalloc`: use the [pymalloc allocato...
large_dataset/raw/docs/python/cmdline/cmdline_312.md
e7124c6c-a27e-5717-b231-0b57804f1823
docs
python
python_cmdline
312
41
Added in version 3.6. Changed in version 3.7: Added the `"default"` allocator. PYTHONMALLOCSTATS[¶](#envvar-PYTHONMALLOCSTATS "Link to this definition") : If set to a non-empty string, Python will print statistics of the [pymalloc memory allocator](../c-api/memory.html#pymalloc) every time a new pymallo...
large_dataset/raw/docs/python/cmdline/cmdline_312.md
78d5c5a3-3005-5b41-b9f4-52d4a9e95578
docs
python
python_cmdline
312
42
error handler](../glossary.html#term-filesystem-encoding-and-error-handler) mode will revert to their pre-3.6 values of ‘mbcs’ and ‘replace’, respectively. Otherwise, the new defaults ‘utf-8’ and ‘surrogatepass’ are used. This may also be enabled at runtime with [`sys._enablelegacywindowsfsencoding...
large_dataset/raw/docs/python/cmdline/cmdline_312.md
2d4444ce-ed91-5196-8989-93e5ac62ac18
docs
python
python_cmdline
312
43
[Availability](../library/intro.html#availability): Windows. Added in version 3.6. PYTHONCOERCECLOCALE[¶](#envvar-PYTHONCOERCECLOCALE "Link to this definition") : If set to the value `0`, causes the main Python command line application to skip coercing the legacy ASCII-based C and POSIX locales to a mor...
large_dataset/raw/docs/python/cmdline/cmdline_312.md
c9c0e79e-bce0-5c50-abae-255fc2e6efc6
docs
python
python_cmdline
312
44
environment before the Python runtime is initialized. This ensures that in addition to being seen by both the interpreter itself and other locale-aware components running in the same process (such as the GNU `readline` library), the updated setting is also seen in subprocesses (regardless of whether...
large_dataset/raw/docs/python/cmdline/cmdline_312.md
fbbf34af-0a0a-5756-a574-a7e86387b22f
docs
python
python_cmdline
312
45
[`sys.stdout`](../library/sys.html#sys.stdout "sys.stdout") ([`sys.stderr`](../library/sys.html#sys.stderr "sys.stderr") continues to use `backslashreplace` as it does in any other locale). This stream handling behavior can be overridden using [`PYTHONIOENCODING`](#envvar-PYTHONIOENCODING) as usual. Fo...
large_dataset/raw/docs/python/cmdline/cmdline_312.md
ee6ffb0c-ddb1-5877-8165-bd51bbe655ca
docs
python
python_cmdline
312
46
Added in version 3.7: See [**PEP 538**](https://peps.python.org/pep-0538/) for more details. PYTHONDEVMODE[¶](#envvar-PYTHONDEVMODE "Link to this definition") : If this environment variable is set to a non-empty string, enable [Python Development Mode](../library/devmode.html#devmode), introducing additional...
large_dataset/raw/docs/python/cmdline/cmdline_312.md
227498f3-48c3-5c99-9d08-c3f4704ce9f7
docs
python
python_cmdline
312
47
[`EncodingWarning`](../library/exceptions.html#EncodingWarning "EncodingWarning") when the locale-specific default encoding is used. See [Opt-in EncodingWarning](../library/io.html#io-encoding-warning) for details. Added in version 3.10. PYTHONNODEBUGRANGES[¶](#envvar-PYTHONNODEBUGRANGES "Link to this de...
large_dataset/raw/docs/python/cmdline/cmdline_312.md
feca5ad6-f42e-5e16-bc32-196a4d79287e
docs
python
python_cmdline
312
48
See also the [`-X perf`](#cmdoption-X) command-line option and [Python support for the Linux perf profiler](../howto/perf_profiling.html#perf-profiling). Added in version 3.12. ### 1.2.1. Debug-mode variables[¶](#debug-mode-variables "Link to this heading") PYTHONDUMPREFS[¶](#envvar-PYTHONDUMPREFS "Link ...
large_dataset/raw/docs/python/cmdline/cmdline_312.md
40c4a075-729b-54f0-b726-13282b888253
docs
python
python_cmdline
313
0
# 1.Command line and environment¶ Source: https://docs.python.org/3.13/using/cmdline.html Version: 3.13 The CPython interpreter scans the command line and the environment for various settings. **CPython implementation detail:** Other implementations’ command line schemes may differ. See [Alternate Implementations](....
large_dataset/raw/docs/python/cmdline/cmdline_313.md
ae400c67-219d-5010-a30b-62c4dfb1d23d
docs
python
python_cmdline
313
1
commands and executes them until an EOF (an end-of-file character, you can produce that with `Ctrl`-`D` on UNIX or `Ctrl`-`Z,` `Enter` on Windows) is read. For more on interactive mode, see [Interactive Mode](../tutorial/appendix.html#tut-interac). * When called with a file name argument or with a file as standar...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
e5bfa3ca-7947-56de-b53c-0eb1302df023
docs
python
python_cmdline
313
2
all consecutive arguments will end up in [`sys.argv`](../library/sys.html#sys.argv "sys.argv") – note that the first element, subscript zero (`sys.argv[0]`), is a string reflecting the program’s source. -c <command>[¶](#cmdoption-c "Link to this definition") : Execute the Python code in *command*. *command* can be o...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
768789ff-102b-55c9-be81-43b332f688f4
docs
python
python_cmdline
313
3
: Search [`sys.path`](../library/sys.html#sys.path "sys.path") for the named module and execute its contents as the [`__main__`](../library/__main__.html#module-__main__ "__main__: The environment where top-level code is run. Covers command-line interfaces, import-time behavior, and ``__name__ == '__main__'``.") ...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
e75e8d1f-39b2-59e5-b73d-afce4e21ca22
docs
python
python_cmdline
313
4
This option cannot be used with built-in modules and extension modules written in C, since they do not have Python module files. However, it can still be used for precompiled modules, even if the original source file is not available. If this option is given, the first element of [`sys.argv`](../li...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
836b98fb-f21c-5bf2-853b-5c581390d942
docs
python
python_cmdline
313
5
as a script. An example is the [`timeit`](../library/timeit.html#module-timeit "timeit: Measure the execution time of small code snippets.") module: ```None python -m timeit -s "setup here" "benchmarked code here" python -m timeit -h # for details ``` Raises an [auditing event](../library/sys....
large_dataset/raw/docs/python/cmdline/cmdline_313.md
4641a817-1651-5b42-a716-db05a15478a1
docs
python
python_cmdline
313
6
If this option is given, the first element of [`sys.argv`](../library/sys.html#sys.argv "sys.argv") will be `"-"` and the current directory will be added to the start of [`sys.path`](../library/sys.html#sys.path "sys.path"). Raises an [auditing event](../library/sys.html#auditing) `cpython.run_stdin` w...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
0e8e68b6-1a59-524d-b690-df24a90dbd6c
docs
python
python_cmdline
313
7
file is executed as the [`__main__`](../library/__main__.html#module-__main__ "__main__: The environment where top-level code is run. Covers command-line interfaces, import-time behavior, and ``__name__ == '__main__'``.") module. If the script name refers to a directory or zipfile, the script name is added...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
339dffa6-891a-5869-ad9a-28cecb2ac29f
docs
python
python_cmdline
313
8
Raises an [auditing event](../library/sys.html#auditing) `cpython.run_file` with argument `filename`. See also [`runpy.run_path()`](../library/runpy.html#runpy.run_path "runpy.run_path") : Equivalent functionality directly available to Python code If no interface option is given, [`-i`](#cmdoption-...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
bc26e54f-bddc-52ca-a4ae-c935a4d695a7
docs
python
python_cmdline
313
9
### 1.1.2. Generic options[¶](#generic-options "Link to this heading") -?[¶](#cmdoption-0 "Link to this definition") -h[¶](#cmdoption-h "Link to this definition") --help[¶](#cmdoption-help "Link to this definition") : Print a short description of all command line options and corresponding environment variables...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
d81f7c1e-be11-5c28-a838-ba362e04b83c
docs
python
python_cmdline
313
10
```None Python 3.8.0b2+ ``` When given twice, print more information about the build, like: ```None Python 3.8.0b2+ (3.8:0c076caaa8, Apr 20 2019, 21:55:00) [GCC 6.2.0 20161005] ``` Added in version 3.6: The `-VV` option. ### 1.1.3. Miscellaneous options[¶](#miscellaneous-options ...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
b7fba822-944f-5b6c-928c-bafef88283cb
docs
python
python_cmdline
313
11
: If given, Python won’t try to write `.pyc` files on the import of source modules. See also [`PYTHONDONTWRITEBYTECODE`](#envvar-PYTHONDONTWRITEBYTECODE). --check-hash-based-pycs default|always|never[¶](#cmdoption-check-hash-based-pycs "Link to this definition") : Control the validation behavior of hash-based ...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
0dcf926e-e86b-5c6a-96b6-e434a3135ec0
docs
python
python_cmdline
313
12
See also the [`PYTHONDEBUG`](#envvar-PYTHONDEBUG) environment variable. This option requires a [debug build of Python](configure.html#debug-build), otherwise it’s ignored. -E[¶](#cmdoption-E "Link to this definition") : Ignore all `PYTHON*` environment variables, e.g. [`PYTHONPATH`](#envvar-PYTHONPA...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
5ce6c5d8-e532-5737-a80a-4a4d4417f6f7
docs
python
python_cmdline
313
13
This can be useful to inspect global variables or a stack trace when a script raises an exception. See also [`PYTHONINSPECT`](#envvar-PYTHONINSPECT). -I[¶](#cmdoption-I "Link to this definition") : Run Python in isolated mode. This also implies [`-E`](#cmdoption-E), [`-P`](#cmdoption-P) and [`-s`](#cmdop...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
a0661fac-b4af-5290-8f29-712ceb08dba3
docs
python
python_cmdline
313
14
extension (see [**PEP 488**](https://peps.python.org/pep-0488/)). See also [`PYTHONOPTIMIZE`](#envvar-PYTHONOPTIMIZE). Changed in version 3.5: Modify `.pyc` filenames according to [**PEP 488**](https://peps.python.org/pep-0488/). -OO[¶](#cmdoption-OO "Link to this definition") : Do [`-O`](#cmdoption-O) and ...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
a44280d8-d39b-50d5-928e-ac102514364b
docs
python
python_cmdline
313
15
If it’s a symbolic link, resolve symbolic links. * `python -c code` and `python` (REPL) command lines: Don’t prepend an empty string, which means the current working directory. See also the [`PYTHONSAFEPATH`](#envvar-PYTHONSAFEPATH) environment variable, and [`-E`](#cmdoption-E) and [`-I`](#cmd...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
99658c0c-d233-580f-9883-cfa4e0c52fff
docs
python
python_cmdline
313
16
are “salted” with an unpredictable random value. Although they remain constant within an individual Python process, they are not predictable between repeated invocations of Python. Hash randomization is intended to provide protection against a denial-of-service caused by carefully chosen inputs tha...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
5f3b69bf-da6b-53c0-9685-cfadba0867c4
docs
python
python_cmdline
313
17
[**PEP 370**](https://peps.python.org/pep-0370/) – Per user site-packages directory -S[¶](#cmdoption-S "Link to this definition") : Disable the import of the module [`site`](../library/site.html#module-site "site: Module responsible for site-specific configuration.") and the site-dependent manipulations of [...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
e371df06-1edf-5afd-b270-da8e80e80b2a
docs
python
python_cmdline
313
18
-v[¶](#cmdoption-v "Link to this definition") : Print a message each time a module is initialized, showing the place (filename or built-in module) from which it is loaded. When given twice (`-vv`), print a message for each file that is checked for when searching for a module. Also provides information on ...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
51566c4d-ecd7-5e17-a1ef-e96187267bab
docs
python
python_cmdline
313
19
-Wdefault # Warn once per call location -Werror # Convert to exceptions -Walways # Warn every time -Wall # Same as -Walways -Wmodule # Warn once per calling module -Wonce # Warn once per Python process -Wignore # Never warn ``` The action names can be abbreviated ...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
15396ea3-cae0-5c60-85e8-55251d52f24c
docs
python
python_cmdline
313
20
(ex: `DeprecationWarning`). This must be a class name; the match test whether the actual warning category of the message is a subclass of the specified warning category. The *module* field matches the (fully qualified) module name; this match is case-sensitive. The *lineno* field matches the l...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
ebe653a8-bfbf-59db-9cf2-96470dedb55b
docs
python
python_cmdline
313
21
[`warnings`](../library/warnings.html#module-warnings "warnings: Issue warning messages and control their disposition.") module. For example, the [`warnings.filterwarnings()`](../library/warnings.html#warnings.filterwarnings "warnings.filterwarnings") function can be used to use a regular expression on the warn...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
526dfa6f-bf31-5e6f-9d2d-4f4da8178494
docs
python
python_cmdline
313
22
See also [`PYTHONFAULTHANDLER`](#envvar-PYTHONFAULTHANDLER). Added in version 3.3. * `-X showrefcount` to output the total reference count and number of used memory blocks when the program finishes or after each statement in the interactive interpreter. This only works on [debug builds](con...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
23705510-6600-508b-9ce6-67125a3f901d
docs
python
python_cmdline
313
23
* `-X int_max_str_digits` configures the [integer string conversion length limitation](../library/stdtypes.html#int-max-str-digits). See also [`PYTHONINTMAXSTRDIGITS`](#envvar-PYTHONINTMAXSTRDIGITS). Added in version 3.11. * `-X importtime` to show how long each import takes. It shows module ...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
bca7b1d2-1b0d-5b0d-a17a-98e33210ac50
docs
python
python_cmdline
313
24
`-X utf8=0` explicitly disables [Python UTF-8 Mode](../library/os.html#utf8-mode) (even when it would otherwise activate automatically). See also [`PYTHONUTF8`](#envvar-PYTHONUTF8). Added in version 3.7. * `-X pycache_prefix=PATH` enables writing `.pyc` files to a parallel tree rooted...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
75d9bd13-a97c-55f4-91f1-093d1f37a6b0
docs
python
python_cmdline
313
25
objects and pyc files are desired as well as suppressing the extra visual location indicators when the interpreter displays tracebacks. See also [`PYTHONNODEBUGRANGES`](#envvar-PYTHONNODEBUGRANGES). Added in version 3.11. * `-X frozen_modules` determines whether or not frozen modules are ...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
a94c354d-4d9b-5cdd-9664-0c3d090ea4d3
docs
python
python_cmdline
313
26
report Python calls. This option is only available on some platforms and will do nothing if is not supported on the current system. The default value is “off”. See also [`PYTHONPERFSUPPORT`](#envvar-PYTHONPERFSUPPORT) and [Python support for the Linux perf profiler](../howto/perf_profiling.html#perf-p...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
fb3470d9-d4e4-5e9d-8d6e-7561796104d1
docs
python
python_cmdline
313
27
[`os.process_cpu_count()`](../library/os.html#os.process_cpu_count "os.process_cpu_count"), and [`multiprocessing.cpu_count()`](../library/multiprocessing.html#multiprocessing.cpu_count "multiprocessing.cpu_count"). *n* must be greater than or equal to 1. This option may be useful for users who need t...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
e5e88c9c-1ac9-50c7-9509-520b9a305c77
docs
python
python_cmdline
313
28
[`__main__`](../library/__main__.html#module-__main__ "__main__: The environment where top-level code is run. Covers command-line interfaces, import-time behavior, and ``__name__ == '__main__'``."). This can be used to execute code early during Python initialization. Python needs to be [built in debug mode]...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
5933db4b-e78f-5244-a441-4a407bd65912
docs
python
python_cmdline
313
29
Changed in version 3.9: Removed the `-X showalloccount` option. Changed in version 3.10: Removed the `-X oldparser` option. ### 1.1.4. Controlling color[¶](#controlling-color "Link to this heading") The Python interpreter is configured by default to use colors to highlight output in certain situations such a...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
1b7cfcb7-5dda-5416-9063-4e7ce98ae2e0
docs
python
python_cmdline
313
30
output. To control the color output only in the Python interpreter, the [`PYTHON_COLORS`](#envvar-PYTHON_COLORS) environment variable can be used. This variable takes precedence over `NO_COLOR`, which in turn takes precedence over `FORCE_COLOR`. ### 1.1.5. Options you shouldn’t use[¶](#options-you-shouldn-t-use "Link ...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
09796664-9700-53bb-82cf-c255023261ac
docs
python
python_cmdline
313
31
`exec_prefix` are installation-dependent directories, both defaulting to `/usr/local`. When [`PYTHONHOME`](#envvar-PYTHONHOME) is set to a single directory, its value replaces both `prefix` and `exec_prefix`. To specify different values for these, set [`PYTHONHOME`](#envvar-PYTHONHOME) to `prefix:e...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
48f7ed2e-b937-57a2-a13f-ea96c613f377
docs
python
python_cmdline
313
32
The default search path is installation dependent, but generally begins with `prefix/lib/pythonversion` (see [`PYTHONHOME`](#envvar-PYTHONHOME) above). It is *always* appended to [`PYTHONPATH`](#envvar-PYTHONPATH). An additional directory will be inserted in the search path in front of [`PYTHONPATH...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
d20a753d-e1cc-500d-91ce-fc3075000d76
docs
python
python_cmdline
313
33
: If this is set to a non-empty string, it overrides the [`sys.platlibdir`](../library/sys.html#sys.platlibdir "sys.platlibdir") value. Added in version 3.9. PYTHONSTARTUP[¶](#envvar-PYTHONSTARTUP "Link to this definition") : If this is the name of a readable file, the Python commands in that file are ...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
7cb68131-cc38-5c28-b5ca-e70f1214eff0
docs
python
python_cmdline
313
34
PYTHONOPTIMIZE[¶](#envvar-PYTHONOPTIMIZE "Link to this definition") : If this is set to a non-empty string it is equivalent to specifying the [`-O`](#cmdoption-O) option. If set to an integer, it is equivalent to specifying [`-O`](#cmdoption-O) multiple times. PYTHONBREAKPOINT[¶](#envvar-PYTHONBREAKPOINT "Li...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
997d5ceb-eab3-5bd6-a7fe-86b5c9329865
docs
python
python_cmdline
313
35
Added in version 3.7. PYTHONDEBUG[¶](#envvar-PYTHONDEBUG "Link to this definition") : If this is set to a non-empty string it is equivalent to specifying the [`-d`](#cmdoption-d) option. If set to an integer, it is equivalent to specifying [`-d`](#cmdoption-d) multiple times. This environment varia...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
8c32b8db-4c1e-5049-a64d-d30ce8d2aa8d
docs
python
python_cmdline
313
36
Changed in version 3.13: Uses PyREPL if possible, in which case [`PYTHONSTARTUP`](#envvar-PYTHONSTARTUP) is also executed. Emits audit events. PYTHONUNBUFFERED[¶](#envvar-PYTHONUNBUFFERED "Link to this definition") : If this is set to a non-empty string it is equivalent to specifying the [`-u`](#cmdoptio...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
56a7dc9f-d80b-554d-bc6b-b485ee34b98b
docs
python
python_cmdline
313
37
files on the import of source modules. This is equivalent to specifying the [`-B`](#cmdoption-B) option. PYTHONPYCACHEPREFIX[¶](#envvar-PYTHONPYCACHEPREFIX "Link to this definition") : If this is set, Python will write `.pyc` files in a mirror directory tree at this path, instead of in `__pycache__` dire...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
03affbfc-7d07-5333-9c05-68045ddb4c12
docs
python
python_cmdline
313
38
values. The integer must be a decimal number in the range [0,4294967295]. Specifying the value 0 will disable hash randomization. Added in version 3.2.3. PYTHONINTMAXSTRDIGITS[¶](#envvar-PYTHONINTMAXSTRDIGITS "Link to this definition") : If this variable is set to an integer, it is used to configur...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
25671139-470b-5dd1-9087-e460d7d8df92
docs
python
python_cmdline
313
39
Changed in version 3.4: The `encodingname` part is now optional. Changed in version 3.6: On Windows, the encoding specified by this variable is ignored for interactive console buffers unless [`PYTHONLEGACYWINDOWSSTDIO`](#envvar-PYTHONLEGACYWINDOWSSTDIO) is also specified. Files and pipes redirected thr...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
a4a9b66b-520f-50ed-b80d-37aa44871f9a
docs
python
python_cmdline
313
40
and [installation paths](../library/sysconfig.html#sysconfig-user-scheme) for `python -m pip install --user`. See also [**PEP 370**](https://peps.python.org/pep-0370/) – Per user site-packages directory PYTHONEXECUTABLE[¶](#envvar-PYTHONEXECUTABLE "Link to this definition") : If this environment va...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
a1806bb9-a5e0-5899-ab25-d0088736b5dc
docs
python
python_cmdline
313
41
PYTHONWARNINGS=error # Convert to exceptions PYTHONWARNINGS=always # Warn every time PYTHONWARNINGS=all # Same as PYTHONWARNINGS=always PYTHONWARNINGS=module # Warn once per calling module PYTHONWARNINGS=once # Warn once per Python process PYTHONWARNINGS=ignore # Never warn ...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
eaa7221e-0e59-5799-b5d2-3950b5f25d15
docs
python
python_cmdline
313
42
[`SIGABRT`](../library/signal.html#signal.SIGABRT "signal.SIGABRT"), [`SIGBUS`](../library/signal.html#signal.SIGBUS "signal.SIGBUS") and [`SIGILL`](../library/signal.html#signal.SIGILL "signal.SIGILL") signals to dump the Python traceback. This is equivalent to [`-X`](#cmdoption-X) `faulthandler` option. ...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
52113701-6145-57f9-8534-ea59961c59ee
docs
python
python_cmdline
313
43
This is equivalent to setting the [`-X`](#cmdoption-X) `tracemalloc` option. Added in version 3.4. PYTHONPROFILEIMPORTTIME[¶](#envvar-PYTHONPROFILEIMPORTTIME "Link to this definition") : If this environment variable is set to a non-empty string, Python will show how long each import takes. This is e...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
45eb589f-2fb9-528c-aa55-78e625f0e65a
docs
python
python_cmdline
313
44
* `default`: use the [default memory allocators](../c-api/memory.html#default-memory-allocators). * `malloc`: use the `malloc()` function of the C library for all domains ([`PYMEM_DOMAIN_RAW`](../c-api/memory.html#c.PYMEM_DOMAIN_RAW "PYMEM_DOMAIN_RAW"), [`PYMEM_DOMAIN_MEM`](../c-api/memory.html#c.PYMEM_DO...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
24d3b9d5-a784-574f-b78b-98db12703bc8
docs
python
python_cmdline
313
45
[`PYMEM_DOMAIN_MEM`](../c-api/memory.html#c.PYMEM_DOMAIN_MEM "PYMEM_DOMAIN_MEM") and [`PYMEM_DOMAIN_OBJ`](../c-api/memory.html#c.PYMEM_DOMAIN_OBJ "PYMEM_DOMAIN_OBJ") domains and use the `malloc()` function for the [`PYMEM_DOMAIN_RAW`](../c-api/memory.html#c.PYMEM_DOMAIN_RAW "PYMEM_DOMAIN_RAW") domain. ...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
ab4f6393-77bc-53c2-8782-e40db0ced544
docs
python
python_cmdline
313
46
[pymalloc memory allocator](../c-api/memory.html#pymalloc) every time a new pymalloc object arena is created, and on shutdown. This variable is ignored if the [`PYTHONMALLOC`](#envvar-PYTHONMALLOC) environment variable is used to force the `malloc()` allocator of the C library, or if Python is conf...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
e3e88591-8c32-5d93-9d24-6f661fee5000
docs
python
python_cmdline
313
47
[`sys._enablelegacywindowsfsencoding()`](../library/sys.html#sys._enablelegacywindowsfsencoding "sys._enablelegacywindowsfsencoding"). [Availability](../library/intro.html#availability): Windows. Added in version 3.6: See [**PEP 529**](https://peps.python.org/pep-0529/) for more details. PYTHONLEGACYWIND...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
2573b17e-55d5-54d0-bc14-1bcc84e11155
docs
python
python_cmdline
313
48
to skip coercing the legacy ASCII-based C and POSIX locales to a more capable UTF-8 based alternative. If this variable is *not* set (or is set to a value other than `0`), the `LC_ALL` locale override environment variable is also not set, and the current locale reported for the `LC_CTYPE` category ...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
739c19a6-72d5-5705-9b41-9b5249b67130
docs
python
python_cmdline
313
49
library), the updated setting is also seen in subprocesses (regardless of whether or not those processes are running a Python interpreter), as well as in operations that query the environment rather than the current C locale (such as Python’s own [`locale.getdefaultlocale()`](../library/locale.html#loca...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
5d0ec334-90c9-537f-bccc-4bdb1f603198
docs
python
python_cmdline
313
50
For debugging purposes, setting `PYTHONCOERCECLOCALE=warn` will cause Python to emit warning messages on `stderr` if either the locale coercion activates, or else if a locale that *would* have triggered coercion is still active when the Python runtime is initialized. Also note that even when locale...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
05ece01e-e345-591c-8631-a701326fd46b
docs
python
python_cmdline
313
51
checks that are too expensive to be enabled by default. This is equivalent to setting the [`-X`](#cmdoption-X) `dev` option. Added in version 3.7. PYTHONUTF8[¶](#envvar-PYTHONUTF8 "Link to this definition") : If set to `1`, enable the [Python UTF-8 Mode](../library/os.html#utf8-mode). If set to `0`...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
c17723b0-ce47-53bc-bdd3-ccc652e1cdac
docs
python
python_cmdline
313
52
: If this variable is set, it disables the inclusion of the tables mapping extra location information (end line, start column offset and end column offset) to every instruction in code objects. This is useful when smaller code objects and pyc files are desired as well as suppressing the extra visual l...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
a44c24bb-9bc2-50f9-a495-13427284dc02
docs
python
python_cmdline
313
53
: If this variable is set to a nonzero value, it enables support for the Linux `perf` profiler so Python calls can be detected by it using DWARF information. If set to `0`, disable Linux `perf` profiler support. See also the [`-X perf_jit`](#cmdoption-X) command-line option and [Python support f...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
93128f6b-7225-5fb3-a629-509c9a83fa2b
docs
python
python_cmdline
313
54
frozen modules are ignored by the import machinery. A value of `on` means they get imported and `off` means they are ignored. The default is `on` for non-debug builds (the normal case) and `off` for debug builds. Note that the `importlib_bootstrap` and `importlib_bootstrap_external` frozen modules a...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
c3cc7c16-05f7-5fef-8a5e-3a6d3b08b26c
docs
python
python_cmdline
313
55
load the Python-based [REPL](../glossary.html#term-REPL) that requires [`curses`](../library/curses.html#module-curses "curses: An interface to the curses library, providing portable terminal handling. (Unix)") and [`readline`](../library/readline.html#module-readline "readline: GNU readline support for Python....
large_dataset/raw/docs/python/cmdline/cmdline_313.md
22b17a37-fde7-5547-a47d-9915c868c6b1
docs
python
python_cmdline
313
56
See also the [`-X gil`](#cmdoption-X) command-line option, which takes precedence over this variable, and [Free-threaded CPython](../whatsnew/3.13.html#whatsnew313-free-threaded-cpython). Added in version 3.13. PYTHON\_JIT[¶](#envvar-PYTHON_JIT "Link to this definition") : On builds where experimental j...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
9267034e-4067-569b-a701-8663db4b6bbf
docs
python
python_cmdline
313
57
after shutting down the interpreter into a file under the path given as the value to this environment variable. Needs Python configured with the [`--with-trace-refs`](configure.html#cmdoption-with-trace-refs) build option. Added in version 3.11. PYTHON\_PRESITE[¶](#envvar-PYTHON_PRESITE "Link to this...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
fe25d715-27ae-57d6-ae1b-2e6080adf627
docs
python
python_cmdline
313
58
Therefore, the imported module is not treated as [`__main__`](../library/__main__.html#module-__main__ "__main__: The environment where top-level code is run. Covers command-line interfaces, import-time behavior, and ``__name__ == '__main__'``."). This can be used to execute code early during Python initializa...
large_dataset/raw/docs/python/cmdline/cmdline_313.md
f7e8fbe0-8d14-5d69-bb77-8a5088ed176e
docs
python
python_cmdline
314
0
# 1.Command line and environment¶ Source: https://docs.python.org/3.14/using/cmdline.html Version: 3.14 The CPython interpreter scans the command line and the environment for various settings. **CPython implementation detail:** Other implementations’ command line schemes may differ. See [Alternate Implementations](....
large_dataset/raw/docs/python/cmdline/cmdline_314.md
0558ffd8-b062-5a87-8263-1975eb47771b
docs
python
python_cmdline
314
1
commands and executes them until an EOF (an end-of-file character, you can produce that with `Ctrl`-`D` on UNIX or `Ctrl`-`Z,` `Enter` on Windows) is read. For more on interactive mode, see [Interactive Mode](../tutorial/appendix.html#tut-interac). * When called with a file name argument or with a file as standar...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
31498ebf-5c96-53c1-9017-1390a022a7fa
docs
python
python_cmdline
314
2
all consecutive arguments will end up in [`sys.argv`](../library/sys.html#sys.argv "sys.argv") – note that the first element, subscript zero (`sys.argv[0]`), is a string reflecting the program’s source. -c <command>[¶](#cmdoption-c "Link to this definition") : Execute the Python code in *command*. *command* can be o...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
e98fcaf7-d2c2-5aca-a808-ea7f886b73b8
docs
python
python_cmdline
314
3
: Search [`sys.path`](../library/sys.html#sys.path "sys.path") for the named module and execute its contents as the [`__main__`](../library/__main__.html#module-__main__ "__main__: The environment where top-level code is run. Covers command-line interfaces, import-time behavior, and ``__name__ == '__main__'``.") ...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
5de81ffb-1090-512a-88d9-bfee19f0dc0a
docs
python
python_cmdline
314
4
This option cannot be used with built-in modules and extension modules written in C, since they do not have Python module files. However, it can still be used for precompiled modules, even if the original source file is not available. If this option is given, the first element of [`sys.argv`](../li...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
b0d9b874-66df-5491-864a-b209c6846b87
docs
python
python_cmdline
314
5
as a script. An example is the [`timeit`](../library/timeit.html#module-timeit "timeit: Measure the execution time of small code snippets.") module: ```None python -m timeit -s "setup here" "benchmarked code here" python -m timeit -h # for details ``` Raises an [auditing event](../library/sys....
large_dataset/raw/docs/python/cmdline/cmdline_314.md
a776cd8b-de61-53fd-8e7f-8a8cd10c99f2
docs
python
python_cmdline
314
6
If this option is given, the first element of [`sys.argv`](../library/sys.html#sys.argv "sys.argv") will be `"-"` and the current directory will be added to the start of [`sys.path`](../library/sys.html#sys.path "sys.path"). Raises an [auditing event](../library/sys.html#auditing) `cpython.run_stdin` w...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
aba09e8b-6357-5591-a056-ce903fd744de
docs
python
python_cmdline
314
7
file is executed as the [`__main__`](../library/__main__.html#module-__main__ "__main__: The environment where top-level code is run. Covers command-line interfaces, import-time behavior, and ``__name__ == '__main__'``.") module. If the script name refers to a directory or zipfile, the script name is added...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
5a908aac-e9d7-591b-b461-ace09516c2ba
docs
python
python_cmdline
314
8
Raises an [auditing event](../library/sys.html#auditing) `cpython.run_file` with argument `filename`. See also [`runpy.run_path()`](../library/runpy.html#runpy.run_path "runpy.run_path") : Equivalent functionality directly available to Python code If no interface option is given, [`-i`](#cmdoption-...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
c3fef828-4412-5578-9232-593f9ad10f94
docs
python
python_cmdline
314
9
### 1.1.2. Generic options[¶](#generic-options "Link to this heading") -?[¶](#cmdoption-0 "Link to this definition") -h[¶](#cmdoption-h "Link to this definition") --help[¶](#cmdoption-help "Link to this definition") : Print a short description of all command line options and corresponding environment variables...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
0eb5f5ff-bb4a-5292-b00b-256965f32796
docs
python
python_cmdline
314
10
```None Python 3.8.0b2+ ``` When given twice, print more information about the build, like: ```None Python 3.8.0b2+ (3.8:0c076caaa8, Apr 20 2019, 21:55:00) [GCC 6.2.0 20161005] ``` Added in version 3.6: The `-VV` option. ### 1.1.3. Miscellaneous options[¶](#miscellaneous-options ...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
deaf24aa-5583-5a56-95d7-785c6bbaaa88
docs
python
python_cmdline
314
11
: If given, Python won’t try to write `.pyc` files on the import of source modules. See also [`PYTHONDONTWRITEBYTECODE`](#envvar-PYTHONDONTWRITEBYTECODE). --check-hash-based-pycs default|always|never[¶](#cmdoption-check-hash-based-pycs "Link to this definition") : Control the validation behavior of hash-based ...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
6d240e18-b54f-57fd-bcec-2b54131836cc
docs
python
python_cmdline
314
12
See also the [`PYTHONDEBUG`](#envvar-PYTHONDEBUG) environment variable. This option requires a [debug build of Python](configure.html#debug-build), otherwise it’s ignored. -E[¶](#cmdoption-E "Link to this definition") : Ignore all `PYTHON*` environment variables, e.g. [`PYTHONPATH`](#envvar-PYTHONPA...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
4d01e033-1735-5b50-a5c3-9b125af8f97c
docs
python
python_cmdline
314
13
This can be useful to inspect global variables or a stack trace when a script raises an exception. See also [`PYTHONINSPECT`](#envvar-PYTHONINSPECT). -I[¶](#cmdoption-I "Link to this definition") : Run Python in isolated mode. This also implies [`-E`](#cmdoption-E), [`-P`](#cmdoption-P) and [`-s`](#cmdop...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
f06dd8c8-8c6d-5044-ad75-f3a24677c1b4
docs
python
python_cmdline
314
14
extension (see [**PEP 488**](https://peps.python.org/pep-0488/)). See also [`PYTHONOPTIMIZE`](#envvar-PYTHONOPTIMIZE). Changed in version 3.5: Modify `.pyc` filenames according to [**PEP 488**](https://peps.python.org/pep-0488/). -OO[¶](#cmdoption-OO "Link to this definition") : Do [`-O`](#cmdoption-O) and ...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
91c596c6-84c9-503c-aa30-2e6d819d9797
docs
python
python_cmdline
314
15
If it’s a symbolic link, resolve symbolic links. * `python -c code` and `python` (REPL) command lines: Don’t prepend an empty string, which means the current working directory. See also the [`PYTHONSAFEPATH`](#envvar-PYTHONSAFEPATH) environment variable, and [`-E`](#cmdoption-E) and [`-I`](#cmd...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
fc4229b2-4edc-5210-ba7d-02798b7c4d0a
docs
python
python_cmdline
314
16
are “salted” with an unpredictable random value. Although they remain constant within an individual Python process, they are not predictable between repeated invocations of Python. Hash randomization is intended to provide protection against a denial-of-service caused by carefully chosen inputs tha...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
72c7c550-c3dd-5e23-82bb-c1e30b8bc5ab
docs
python
python_cmdline
314
17
[**PEP 370**](https://peps.python.org/pep-0370/) – Per user site-packages directory -S[¶](#cmdoption-S "Link to this definition") : Disable the import of the module [`site`](../library/site.html#module-site "site: Module responsible for site-specific configuration.") and the site-dependent manipulations of [...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
0359bd32-05c0-57ae-acf8-f5685ade7e65
docs
python
python_cmdline
314
18
-v[¶](#cmdoption-v "Link to this definition") : Print a message each time a module is initialized, showing the place (filename or built-in module) from which it is loaded. When given twice (`-vv`), print a message for each file that is checked for when searching for a module. Also provides information on ...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
57f09f4d-f975-5987-bbe5-ea639b3857ef
docs
python
python_cmdline
314
19
-Wdefault # Warn once per call location -Werror # Convert to exceptions -Walways # Warn every time -Wall # Same as -Walways -Wmodule # Warn once per calling module -Wonce # Warn once per Python process -Wignore # Never warn ``` The action names can be abbreviated ...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
ca3d3d0b-f3af-5909-ac8f-a1fdb5dc60f5
docs
python
python_cmdline
314
20
(ex: `DeprecationWarning`). This must be a class name; the match test whether the actual warning category of the message is a subclass of the specified warning category. The *module* field matches the (fully qualified) module name; this match is case-sensitive. The *lineno* field matches the l...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
5796ee2b-53a5-5862-9ebf-4ec095319c84
docs
python
python_cmdline
314
21
[`warnings`](../library/warnings.html#module-warnings "warnings: Issue warning messages and control their disposition.") module. For example, the [`warnings.filterwarnings()`](../library/warnings.html#warnings.filterwarnings "warnings.filterwarnings") function can be used to use a regular expression on the warn...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
8b39045f-1636-5384-aaf0-cb55e9580f37
docs
python
python_cmdline
314
22
See also [`PYTHONFAULTHANDLER`](#envvar-PYTHONFAULTHANDLER). Added in version 3.3. * `-X showrefcount` to output the total reference count and number of used memory blocks when the program finishes or after each statement in the interactive interpreter. This only works on [debug builds](con...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
4175337c-cb07-5172-add6-a458836329bd
docs
python
python_cmdline
314
23
* `-X int_max_str_digits` configures the [integer string conversion length limitation](../library/stdtypes.html#int-max-str-digits). See also [`PYTHONINTMAXSTRDIGITS`](#envvar-PYTHONINTMAXSTRDIGITS). Added in version 3.11. * `-X importtime` to show how long each import takes. It shows module ...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
54ef2ef0-c9b6-5e02-b6e0-a1d7a15632db
docs
python
python_cmdline
314
24
* `-X dev`: enable [Python Development Mode](../library/devmode.html#devmode), introducing additional runtime checks that are too expensive to be enabled by default. See also [`PYTHONDEVMODE`](#envvar-PYTHONDEVMODE). Added in version 3.7. * `-X utf8` enables the [Python UTF-8 Mode](../library...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
1ec052aa-2d29-5eb5-89a4-b5b4b4738f86
docs
python
python_cmdline
314
25
See also [`PYTHONWARNDEFAULTENCODING`](#envvar-PYTHONWARNDEFAULTENCODING). Added in version 3.10. * `-X no_debug_ranges` disables the inclusion of the tables mapping extra location information (end line, start column offset and end column offset) to every instruction in code objects. This i...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
55607ae0-9da0-5129-a9bc-5ac13dc6fb60
docs
python
python_cmdline
314
26
`importlib_bootstrap_external` frozen modules are always used, even if this flag is set to `off`. See also [`PYTHON_FROZEN_MODULES`](#envvar-PYTHON_FROZEN_MODULES). Added in version 3.11. * `-X perf` enables support for the Linux `perf` profiler. When this option is provided, the `perf` pro...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
e74af786-6e5e-51b7-9a08-b0fb128b2ac1
docs
python
python_cmdline
314
27
system. The default value is “off”. See also [`PYTHON_PERF_JIT_SUPPORT`](#envvar-PYTHON_PERF_JIT_SUPPORT) and [Python support for the Linux perf profiler](../howto/perf_profiling.html#perf-profiling). Added in version 3.13. * `-X disable_remote_debug` disables the remote debugging support as desc...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
48b398e8-080e-5ab1-84a8-e92b654d0002
docs
python
python_cmdline
314
28
[`os.process_cpu_count()`](../library/os.html#os.process_cpu_count "os.process_cpu_count"), and [`multiprocessing.cpu_count()`](../library/multiprocessing.html#multiprocessing.cpu_count "multiprocessing.cpu_count"). *n* must be greater than or equal to 1. This option may be useful for users who need t...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
46ca8db7-af9a-542f-9fc1-ef81f0878c76
docs
python
python_cmdline
314
29
[`__main__`](../library/__main__.html#module-__main__ "__main__: The environment where top-level code is run. Covers command-line interfaces, import-time behavior, and ``__name__ == '__main__'``."). This can be used to execute code early during Python initialization. Python needs to be [built in debug mode]...
large_dataset/raw/docs/python/cmdline/cmdline_314.md