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
b92c591c-0951-5e60-a9ad-715cc549bc7f
docs
python
python_cmdline
314
30
`Thread.start()` when starting. Otherwise, threads will start with an empty context. If unset, the value of this option defaults to `1` on free-threaded builds and to `0` otherwise. See also [`PYTHON_THREAD_INHERIT_CONTEXT`](#envvar-PYTHON_THREAD_INHERIT_CONTEXT). Added in version 3.14. ...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
6ed1c24e-69c1-57a1-b20c-77374751b97d
docs
python
python_cmdline
314
31
bytecode in builds configured with [`--disable-gil`](configure.html#cmdoption-disable-gil). When disabled, this also disables the specializing interpreter. See also [`PYTHON_TLBC`](#envvar-PYTHON_TLBC). Added in version 3.14. It also allows passing arbitrary values and retrieving them thro...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
6df788c9-b979-59c7-8dce-e236ea4ecb68
docs
python
python_cmdline
314
32
Setting the environment variable `TERM` to `dumb` will disable color. If the [`FORCE_COLOR`](https://force-color.org/) environment variable is set, then color will be enabled regardless of the value of TERM. This is useful on CI systems which aren’t terminals but can still display ANSI escape sequences. If the [`NO_C...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
29b1b34e-f4ee-5176-8556-f438f96442fb
docs
python
python_cmdline
314
33
command-line switches override environmental variables where there is a conflict. PYTHONHOME[¶](#envvar-PYTHONHOME "Link to this definition") : Change the location of the standard Python libraries. By default, the libraries are searched in `prefix/lib/pythonversion` and `exec_prefix/lib/pythonversion`, where...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
b9fb5e2d-2a06-5bdf-9ba3-1f5ae9e03e2f
docs
python
python_cmdline
314
34
Non-existent directories are silently ignored. In addition to normal directories, individual [`PYTHONPATH`](#envvar-PYTHONPATH) entries may refer to zipfiles containing pure Python modules (in either source or compiled form). Extension modules cannot be imported from zipfiles. The default search p...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
cb9dd5d9-de4f-59cd-8ba1-b1a2235438f9
docs
python
python_cmdline
314
35
path to [`sys.path`](../library/sys.html#sys.path "sys.path"): see the [`-P`](#cmdoption-P) option for details. Added in version 3.11. PYTHONPLATLIBDIR[¶](#envvar-PYTHONPLATLIBDIR "Link to this definition") : If this is set to a non-empty string, it overrides the [`sys.platlibdir`](../library/sys.html#sys.p...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
c4caecae-a4aa-5ee0-a6a0-d5b7a9cbb7db
docs
python
python_cmdline
314
36
[`sys.ps2`](../library/sys.html#sys.ps2 "sys.ps2") and the hook [`sys.__interactivehook__`](../library/sys.html#sys.__interactivehook__ "sys.__interactivehook__") in this file. Raises an [auditing event](../library/sys.html#auditing) `cpython.run_startup` with the filename as the argument when called on st...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
a4635feb-e4e7-5d56-a22d-67127df9d529
docs
python
python_cmdline
314
37
called by built-in [`breakpoint()`](../library/functions.html#breakpoint "breakpoint"). If not set, or set to the empty string, it is equivalent to the value “pdb.set\_trace”. Setting this to the string “0” causes the default implementation of [`sys.breakpointhook()`](../library/sys.html#sys.breakpointhook ...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
fe1abd5a-12c1-538d-9155-102290202fd8
docs
python
python_cmdline
314
38
This variable can also be modified by Python code using [`os.environ`](../library/os.html#os.environ "os.environ") to force inspect mode on program termination. Raises an [auditing event](../library/sys.html#auditing) `cpython.run_stdin` with no arguments. Changed in version 3.12.5: (also 3.11.10, 3.1...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
fbb582c7-a8a4-5ec4-9b24-c43ddb53d13e
docs
python
python_cmdline
314
39
PYTHONCASEOK[¶](#envvar-PYTHONCASEOK "Link to this definition") : If this is set, Python ignores case in [`import`](../reference/simple_stmts.html#import) statements. This only works on Windows and macOS. PYTHONDONTWRITEBYTECODE[¶](#envvar-PYTHONDONTWRITEBYTECODE "Link to this definition") : If this is set to ...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
94e18aa2-3658-541a-b79b-45af1f97ffc6
docs
python
python_cmdline
314
40
to seed the hashes of str and bytes objects. If [`PYTHONHASHSEED`](#envvar-PYTHONHASHSEED) is set to an integer value, it is used as a fixed seed for generating the hash() of the types covered by the hash randomization. Its purpose is to allow repeatable hashing, such as for selftests for the ...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
8efdde30-9e19-5736-9e04-12c868dd36ad
docs
python
python_cmdline
314
41
for stdin/stdout/stderr, in the syntax `encodingname:errorhandler`. Both the `encodingname` and the `:errorhandler` parts are optional and have the same meaning as in [`str.encode()`](../library/stdtypes.html#str.encode "str.encode"). For stderr, the `:errorhandler` part is ignored; the handler will al...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
5953d288-aeb8-51ca-a776-6bf40e980b8b
docs
python
python_cmdline
314
42
[**PEP 370**](https://peps.python.org/pep-0370/) – Per user site-packages directory PYTHONUSERBASE[¶](#envvar-PYTHONUSERBASE "Link to this definition") : Defines the [`user base directory`](../library/site.html#site.USER_BASE "site.USER_BASE"), which is used to compute the path of the [`user site-packages di...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
3a1dbd80-0f25-5166-ba51-0d06eb6f3baa
docs
python
python_cmdline
314
43
separated string, it is equivalent to specifying [`-W`](#cmdoption-W) multiple times, with filters later in the list taking precedence over those earlier in the list. The simplest settings apply a particular action unconditionally to all warnings emitted by a process (even those that are otherwise ...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
783f46b5-640e-5a32-9805-05f8977bb771
docs
python
python_cmdline
314
44
: If this environment variable is set to a non-empty string, [`faulthandler.enable()`](../library/faulthandler.html#faulthandler.enable "faulthandler.enable") is called at startup: install a handler for [`SIGSEGV`](../library/signal.html#signal.SIGSEGV "signal.SIGSEGV"), [`SIGFPE`](../library/signal.html#sign...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
06e0aef0-5364-5f84-b0b9-0844a4ea069a
docs
python
python_cmdline
314
45
the variable is the maximum number of frames stored in a traceback of a trace. For example, `PYTHONTRACEMALLOC=1` stores only the most recent frame. See the [`tracemalloc.start()`](../library/tracemalloc.html#tracemalloc.start "tracemalloc.start") function for more information. This is equivalent to...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
c74755b1-5cb0-5c4f-8f38-4da11a239465
docs
python
python_cmdline
314
46
: If this environment variable is set to a non-empty string, enable the [debug mode](../library/asyncio-dev.html#asyncio-debug-mode) of the [`asyncio`](../library/asyncio.html#module-asyncio "asyncio: Asynchronous I/O.") module. Added in version 3.4. PYTHONMALLOC[¶](#envvar-PYTHONMALLOC "Link to this defini...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
27627a3e-0a7f-5b79-ac9e-408c5777cf0e
docs
python
python_cmdline
314
47
[`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_314.md
cad60d02-b31e-56fa-ab01-b09de8ad3340
docs
python
python_cmdline
314
48
* `pymalloc_debug`: same as `pymalloc` but also install debug hooks. * `mimalloc_debug`: same as `mimalloc` but also install debug hooks. Added in version 3.6. Changed in version 3.7: Added the `"default"` allocator. PYTHONMALLOCSTATS[¶](#envvar-PYTHONMALLOCSTATS "Link to this definition") : If set...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
500b06f4-da77-5809-ad4a-41e829b0a6a5
docs
python
python_cmdline
314
49
: If set to a non-empty string, the default [filesystem encoding and 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 a...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
6a401cb3-a46c-577a-be52-a5a829a3b538
docs
python
python_cmdline
314
50
This variable is ignored if the standard streams are redirected (to files or pipes) rather than referring to console buffers. [Availability](../library/intro.html#availability): Windows. Added in version 3.6. PYTHONCOERCECLOCALE[¶](#envvar-PYTHONCOERCECLOCALE "Link to this definition") : If set to ...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
dc25d247-d398-5080-b99c-7f10bc862ef6
docs
python
python_cmdline
314
51
If setting one of these locale categories succeeds, then the `LC_CTYPE` environment variable will also be set accordingly in the current process environment before the Python runtime is initialized. This ensures that in addition to being seen by both the interpreter itself and other locale-aware com...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
b350433b-7938-56a3-8ac8-fea036379dd0
docs
python
python_cmdline
314
52
[`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_314.md
eb242fcf-4156-5f71-947a-7989f7785c45
docs
python
python_cmdline
314
53
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_314.md
9a359c00-db9c-5168-b611-1de5a45f7d44
docs
python
python_cmdline
314
54
[`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_314.md
29b82c73-8f3a-5732-9ba0-59cbceba82a6
docs
python
python_cmdline
314
55
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. PYTHON\_PERF\_JIT\_SUPPORT[¶](#envvar-PYTHON_PERF_JIT_SUPPORT "Link to this definition") : If this variable is set to a nonzero...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
cc1ba3fd-2cda-5a46-9029-fcc0cfc56256
docs
python
python_cmdline
314
56
to schedule code for execution in another process and the functionality to receive code for execution in the current process. See also the [`-X disable_remote_debug`](#cmdoption-X) command-line option. Added in version 3.14. PYTHON\_CPU\_COUNT[¶](#envvar-PYTHON_CPU_COUNT "Link to this definition") : ...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
a8a0aa7e-00af-5afd-8f73-82e6a9397559
docs
python
python_cmdline
314
57
for non-debug builds (the normal case) and `off` for debug builds. Note that the `importlib_bootstrap` and `importlib_bootstrap_external` frozen modules are always used, even if this flag is set to `off`. See also the [`-X frozen_modules`](#cmdoption-X) command-line option. Added in version 3....
large_dataset/raw/docs/python/cmdline/cmdline_314.md
8ed25ea5-ab56-50dc-9649-4f9a6e69fbef
docs
python
python_cmdline
314
58
instead use the traditional parser-based [REPL](../glossary.html#term-REPL). Added in version 3.13. PYTHON\_HISTORY[¶](#envvar-PYTHON_HISTORY "Link to this definition") : This environment variable can be used to set the location of a `.python_history` file (by default, it is `.python_history` in the ...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
aebcc9ee-6a35-59cb-90fb-197cc7c75c2a
docs
python
python_cmdline
314
59
: If this variable is set to `1` then [`Thread`](../library/threading.html#threading.Thread "threading.Thread") will, by default, use a copy of context of the caller of `Thread.start()` when starting. Otherwise, new threads will start with an empty context. If unset, this variable defaults to `1` on free-...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
991a83c5-5262-5a12-965a-15ea4d36ac23
docs
python
python_cmdline
314
60
PYTHON\_JIT[¶](#envvar-PYTHON_JIT "Link to this definition") : On builds where experimental just-in-time compilation is available, this variable can force the JIT to be disabled (`0`) or enabled (`1`) at interpreter startup. Added in version 3.13. PYTHON\_TLBC[¶](#envvar-PYTHON_TLBC "Link to this defini...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
9add4126-80f1-545f-8941-0f96e54c4903
docs
python
python_cmdline
314
61
Needs Python configured with the [`--with-trace-refs`](configure.html#cmdoption-with-trace-refs) build option. PYTHONDUMPREFSFILE[¶](#envvar-PYTHONDUMPREFSFILE "Link to this definition") : If set, Python will dump objects and reference counts still alive after shutting down the interpreter into a file under ...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
a503782e-0fd2-5012-b95f-ed8a7d4914e1
docs
python
python_cmdline
314
62
executed, and before 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 is created. Therefore, the imported module is not treated as [`__main__`](../libra...
large_dataset/raw/docs/python/cmdline/cmdline_314.md
d9ac37d6-1dba-5ebe-8ffd-19062d025dfe
docs
python
python_cmdline
315
0
# 1.Command line and environment¶ Source: https://docs.python.org/3.15/using/cmdline.html Version: 3.15 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_315.md
ca23ccdd-2d9e-5f56-8410-6382d82ae52f
docs
python
python_cmdline
315
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_315.md
7dd8566e-f0ed-5ea3-91d4-acfdca17c03d
docs
python
python_cmdline
315
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_315.md
5c3ee89c-ad5d-51f0-bd2b-a1161e25e382
docs
python
python_cmdline
315
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_315.md
ba8bb984-52c7-5e94-b90e-07c77e812504
docs
python
python_cmdline
315
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_315.md
0feb8134-d25d-5396-89f6-1572eb877e74
docs
python
python_cmdline
315
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_315.md
031fe80a-ec9e-51f2-9f17-b9590d75c24d
docs
python
python_cmdline
315
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_315.md
0df6cf76-a5e3-54ec-b4d7-2ad08bd79036
docs
python
python_cmdline
315
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_315.md
1f82681b-c224-5e27-9e35-1aeac64576a1
docs
python
python_cmdline
315
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_315.md
75f3a39c-f653-51e0-8761-f5b0a986b875
docs
python
python_cmdline
315
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_315.md
9841cd9b-b633-5af1-a8e7-b3cc82345c56
docs
python
python_cmdline
315
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_315.md
af39745a-f16a-5875-97b8-6f245fd75b2b
docs
python
python_cmdline
315
11
Deprecated since version 3.15: Deprecate [`-b`](#cmdoption-b) and `-bb` command line options and schedule them to become no-op in Python 3.17. These were primarily helpers for the Python 2 -> 3 transition. Starting with Python 3.17, no [`BytesWarning`](../library/exceptions.html#BytesWarning "BytesWarni...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
0bd484c9-1518-5496-a5b8-edd6658c683a
docs
python
python_cmdline
315
12
semantics. When set to `always`, all hash-based `.pyc` files, whether checked or unchecked, are validated against their corresponding source file. When set to `never`, hash-based `.pyc` files are not validated against their corresponding source files. The semantics of timestamp-based `.pyc` files a...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
fe0a33ff-f441-5ad1-b7f3-8e5e057434ef
docs
python
python_cmdline
315
13
Using the [`-i`](#cmdoption-i) option will enter interactive mode in any of the following circumstances: * When a script is passed as first argument * When the [`-c`](#cmdoption-c) option is used * When the [`-m`](#cmdoption-m) option is used Interactive mode will start even when [`sys.stdin`](../...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
9d868198-c616-5ecb-b6c6-93f950da76db
docs
python
python_cmdline
315
14
variables are ignored, too. Further restrictions may be imposed to prevent the user from injecting malicious code. Added in version 3.4. -O[¶](#cmdoption-O "Link to this definition") : Remove assert statements and any code conditional on the value of [`__debug__`](../library/constants.html#debug__ "...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
773627b0-d293-57f5-8871-b9eb5731231e
docs
python
python_cmdline
315
15
Changed in version 3.5: Modify `.pyc` filenames according to [**PEP 488**](https://peps.python.org/pep-0488/). -P[¶](#cmdoption-P "Link to this definition") : Don’t prepend a potentially unsafe path to [`sys.path`](../library/sys.html#sys.path "sys.path"): * `python -m module` command line: Don’t prepend th...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
7b0b95c6-2592-511c-98c3-b2f0930b1193
docs
python
python_cmdline
315
16
: Turn on hash randomization. This option only has an effect if the [`PYTHONHASHSEED`](#envvar-PYTHONHASHSEED) environment variable is set to anything other than `random`, since hash randomization is enabled by default. On previous versions of Python, this option turns on hash randomization, so that ...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
6f44bd79-033d-5aa6-a26b-95c9bd2388bb
docs
python
python_cmdline
315
17
Added in version 3.2.3. Changed in version 3.7: The option is no longer ignored. -s[¶](#cmdoption-s "Link to this definition") : Don’t add the [`user site-packages directory`](../library/site.html#site.USER_SITE "site.USER_SITE") to [`sys.path`](../library/sys.html#sys.path "sys.path"). See also [`...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
8f92eac6-9b67-5534-9859-824f11c9b3b8
docs
python
python_cmdline
315
18
[`site.main()`](../library/site.html#site.main "site.main") if you want them to be triggered). -u[¶](#cmdoption-u "Link to this definition") : Force the stdout and stderr streams to be unbuffered. This option has no effect on the stdin stream. See also [`PYTHONUNBUFFERED`](#envvar-PYTHONUNBUFFERED). ...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
51b60651-5af5-5fbf-9ff4-a1ad777d4b9e
docs
python
python_cmdline
315
19
See also [`PYTHONVERBOSE`](#envvar-PYTHONVERBOSE). -W arg[¶](#cmdoption-W "Link to this definition") : Warning control. Python’s warning machinery by default prints warning messages to [`sys.stderr`](../library/sys.html#sys.stderr "sys.stderr"). The simplest settings apply a particular action unconditio...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
efe43855-c0d0-5b5b-b3be-94d16c5f4f6e
docs
python
python_cmdline
315
20
Empty fields match all values; trailing empty fields may be omitted. For example `-W ignore::DeprecationWarning` ignores all DeprecationWarning warnings. The *action* field is as explained above but only applies to warnings that match the remaining fields. The *message* field must match the st...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
b2635814-6e87-5c54-b8e0-90560db83819
docs
python
python_cmdline
315
21
must match, otherwise it specifies a literal string that the fully qualified module name must be equal to. The *lineno* field matches the line number, where zero matches all line numbers and is thus equivalent to an omitted line number. Multiple [`-W`](#cmdoption-W) options can be given; when a wa...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
2645a00a-17ca-50ea-9155-7598f9c144d3
docs
python
python_cmdline
315
22
function can be used to use a regular expression on the warning message. See [The Warnings Filter](../library/warnings.html#warning-filter) and [Describing Warning Filters](../library/warnings.html#describing-warning-filters) for more details. Changed in version 3.15: Added regular expression support ...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
ef9c3bab-f8c8-5b63-b5d6-19058b00e8fd
docs
python
python_cmdline
315
23
memory blocks when the program finishes or after each statement in the interactive interpreter. This only works on [debug builds](configure.html#debug-build). Added in version 3.4. * `-X tracemalloc` to start tracing Python memory allocations using the [`tracemalloc`](../library/tracemalloc...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
c5d6387a-60b1-57dc-9b7c-41d314597693
docs
python
python_cmdline
315
24
Added in version 3.11. * `-X importtime` to show how long each import takes. It shows module name, cumulative time (including nested imports) and self time (excluding nested imports). Note that its output may be broken in multi-threaded application. Typical usage is `python -X importtime -c ...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
91b7d900-480f-570f-b1c2-0d356eeb0fcc
docs
python
python_cmdline
315
25
default. See also [`PYTHONDEVMODE`](#envvar-PYTHONDEVMODE). Added in version 3.7. * `-X utf8` enables the [Python UTF-8 Mode](../library/os.html#utf8-mode). `-X utf8=0` explicitly disables [Python UTF-8 Mode](../library/os.html#utf8-mode) (even when it would otherwise activate automatically...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
fd927842-0770-5936-aac3-5ef71a064ec1
docs
python
python_cmdline
315
26
* `-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 is useful when smaller code objects and pyc files are desired as well as suppressing the extra visual ...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
e51c44b5-31c2-59b0-8fe8-a9d66362accf
docs
python
python_cmdline
315
27
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` profiler will be able to report Python calls. This option is only avail...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
f98924c3-0e07-5295-bf57-7c7bb34f8b43
docs
python
python_cmdline
315
28
system. The default value is “off”. See also [`PYTHON_PERF_JIT_SUPPORT`](#envvar-PYTHON_PERF_JIT_SUPPORT) and [Python support for the perf map compatible profilers](../howto/perf_profiling.html#perf-profiling). Added in version 3.13. * `-X disable_remote_debug` disables the remote debugging suppo...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
c7f73940-e0c0-5eb6-a0bb-fda4e4216132
docs
python
python_cmdline
315
29
[`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_315.md
dfda6a4d-d455-540a-916e-7daf9c8f7bfc
docs
python
python_cmdline
315
30
[`__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_315.md
d136c9f1-c5b6-5243-9328-f8763847ca6a
docs
python
python_cmdline
315
31
`Thread.start()` when starting. Otherwise, threads will start with an empty context. If unset, the value of this option defaults to `1` on free-threaded builds and to `0` otherwise. See also [`PYTHON_THREAD_INHERIT_CONTEXT`](#envvar-PYTHON_THREAD_INHERIT_CONTEXT). Added in version 3.14. ...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
be3139fc-677f-5b6b-a082-3401f828dd1b
docs
python
python_cmdline
315
32
bytecode in builds configured with [`--disable-gil`](configure.html#cmdoption-disable-gil). When disabled, this also disables the specializing interpreter. See also [`PYTHON_TLBC`](#envvar-PYTHON_TLBC). Added in version 3.14. It also allows passing arbitrary values and retrieving them thro...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
a0616446-341d-5860-b8cf-9588222cd4ab
docs
python
python_cmdline
315
33
Setting the environment variable `TERM` to `dumb` will disable color. If the [`FORCE_COLOR`](https://force-color.org/) environment variable is set, then color will be enabled regardless of the value of TERM. This is useful on CI systems which aren’t terminals but can still display ANSI escape sequences. If the [`NO_C...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
327bac51-9f69-5646-b864-f568cd3879fe
docs
python
python_cmdline
315
34
command-line switches override environmental variables where there is a conflict. PYTHONHOME[¶](#envvar-PYTHONHOME "Link to this definition") : Change the location of the standard Python libraries. By default, the libraries are searched in `prefix/lib/pythonversion` and `exec_prefix/lib/pythonversion`, where...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
5e8e724b-e3f1-5e18-943c-c2ce359cecf4
docs
python
python_cmdline
315
35
Non-existent directories are silently ignored. In addition to normal directories, individual [`PYTHONPATH`](#envvar-PYTHONPATH) entries may refer to zipfiles containing pure Python modules (in either source or compiled form). Extension modules cannot be imported from zipfiles. The default search p...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
a93daa51-c351-5082-82f9-81a275f5e25c
docs
python
python_cmdline
315
36
path to [`sys.path`](../library/sys.html#sys.path "sys.path"): see the [`-P`](#cmdoption-P) option for details. Added in version 3.11. PYTHONPLATLIBDIR[¶](#envvar-PYTHONPLATLIBDIR "Link to this definition") : If this is set to a non-empty string, it overrides the [`sys.platlibdir`](../library/sys.html#sys.p...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
35795722-9a3a-5980-bda9-9161a2a04741
docs
python
python_cmdline
315
37
[`sys.ps2`](../library/sys.html#sys.ps2 "sys.ps2") and the hook [`sys.__interactivehook__`](../library/sys.html#sys.__interactivehook__ "sys.__interactivehook__") in this file. Raises an [auditing event](../library/sys.html#auditing) `cpython.run_startup` with the filename as the argument when called on st...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
be206783-e447-512a-9bc3-dc1864268349
docs
python
python_cmdline
315
38
called by built-in [`breakpoint()`](../library/functions.html#breakpoint "breakpoint"). If not set, or set to the empty string, it is equivalent to the value “pdb.set\_trace”. Setting this to the string “0” causes the default implementation of [`sys.breakpointhook()`](../library/sys.html#sys.breakpointhook ...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
ab46eb19-c344-5c26-b8ce-0526007842d7
docs
python
python_cmdline
315
39
This variable can also be modified by Python code using [`os.environ`](../library/os.html#os.environ "os.environ") to force inspect mode on program termination. Raises an [auditing event](../library/sys.html#auditing) `cpython.run_stdin` with no arguments. Changed in version 3.12.5: (also 3.11.10, 3.1...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
00af760f-912a-5e06-a792-052078ea67f6
docs
python
python_cmdline
315
40
PYTHONCASEOK[¶](#envvar-PYTHONCASEOK "Link to this definition") : If this is set, Python ignores case in [`import`](../reference/simple_stmts.html#import) statements. This only works on Windows and macOS. PYTHONDONTWRITEBYTECODE[¶](#envvar-PYTHONDONTWRITEBYTECODE "Link to this definition") : If this is set to ...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
fc0b04d0-02da-52c1-888f-4d72c8e58fa8
docs
python
python_cmdline
315
41
to seed the hashes of str and bytes objects. If [`PYTHONHASHSEED`](#envvar-PYTHONHASHSEED) is set to an integer value, it is used as a fixed seed for generating the hash() of the types covered by the hash randomization. Its purpose is to allow repeatable hashing, such as for selftests for the ...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
45f18c0b-2800-5bd5-af2f-6275e2068033
docs
python
python_cmdline
315
42
for stdin/stdout/stderr, in the syntax `encodingname:errorhandler`. Both the `encodingname` and the `:errorhandler` parts are optional and have the same meaning as in [`str.encode()`](../library/stdtypes.html#str.encode "str.encode"). For stderr, the `:errorhandler` part is ignored; the handler will al...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
4d78f524-bc20-539d-b276-9fe3f0397f4e
docs
python
python_cmdline
315
43
[**PEP 370**](https://peps.python.org/pep-0370/) – Per user site-packages directory PYTHONUSERBASE[¶](#envvar-PYTHONUSERBASE "Link to this definition") : Defines the [`user base directory`](../library/site.html#site.USER_BASE "site.USER_BASE"), which is used to compute the path of the [`user site-packages di...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
350f9e5e-371c-5ba1-8962-54dc99030df5
docs
python
python_cmdline
315
44
separated string, it is equivalent to specifying [`-W`](#cmdoption-W) multiple times, with filters later in the list taking precedence over those earlier in the list. The simplest settings apply a particular action unconditionally to all warnings emitted by a process (even those that are otherwise ...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
5887e706-3948-594f-b7b5-cf7517807a7f
docs
python
python_cmdline
315
45
PYTHONFAULTHANDLER[¶](#envvar-PYTHONFAULTHANDLER "Link to this definition") : If this environment variable is set to a non-empty string, [`faulthandler.enable()`](../library/faulthandler.html#faulthandler.enable "faulthandler.enable") is called at startup: install a handler for [`SIGSEGV`](../library/signal.h...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
3a3a1544-a66b-52a9-8ac5-63ae74ade6db
docs
python
python_cmdline
315
46
Python memory allocations using the [`tracemalloc`](../library/tracemalloc.html#module-tracemalloc "tracemalloc: Trace memory allocations.") module. The value of the variable is the maximum number of frames stored in a traceback of a trace. For example, `PYTHONTRACEMALLOC=1` stores only the most recent ...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
58bdbd81-578c-539b-80ee-0ce5b431acd9
docs
python
python_cmdline
315
47
Changed in version 3.14: Added `PYTHONPROFILEIMPORTTIME=2` to also trace imports of loaded modules. PYTHONASYNCIODEBUG[¶](#envvar-PYTHONASYNCIODEBUG "Link to this definition") : If this environment variable is set to a non-empty string, enable the [debug mode](../library/asyncio-dev.html#asyncio-debug-mode) ...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
35b3fd06-a1cf-5ca4-8cae-4b9bba9cbc1d
docs
python
python_cmdline
315
48
[`PYMEM_DOMAIN_OBJ`](../c-api/memory.html#c.PYMEM_DOMAIN_OBJ "PYMEM_DOMAIN_OBJ")). * `pymalloc`: use the [pymalloc allocator](../c-api/memory.html#pymalloc) for [`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_O...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
0e9caeea-c4f6-5a72-b7dc-eec2b3a74ce4
docs
python
python_cmdline
315
49
allocators](../c-api/memory.html#default-memory-allocators). * `malloc_debug`: same as `malloc` but also install debug hooks. * `pymalloc_debug`: same as `pymalloc` but also install debug hooks. * `mimalloc_debug`: same as `mimalloc` but also install debug hooks. Added in version 3.6. Change...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
d8a064af-e920-5bb4-9650-2f5b38c4634a
docs
python
python_cmdline
315
50
PYTHON\_PYMALLOC\_HUGEPAGES[¶](#envvar-PYTHON_PYMALLOC_HUGEPAGES "Link to this definition") : If set to a non-zero integer, enable huge page support for [pymalloc](../c-api/memory.html#pymalloc) arenas. Set to `0` or unset to disable. Python must be compiled with [`--with-pymalloc-hugepages`](configure.html#c...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
ed3a2220-72c5-502f-b271-c913ead61ce9
docs
python
python_cmdline
315
51
PYTHONLEGACYWINDOWSFSENCODING[¶](#envvar-PYTHONLEGACYWINDOWSFSENCODING "Link to this definition") : If set to a non-empty string, the default [filesystem encoding and error handler](../glossary.html#term-filesystem-encoding-and-error-handler) mode will revert to their pre-3.6 values of ‘mbcs’ and ‘replace’, r...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
71e5c5e5-9081-566e-84c6-676bf1f41aaf
docs
python
python_cmdline
315
52
the active console code page, rather than using utf-8. This variable is ignored if the standard streams are redirected (to files or pipes) rather than referring to console buffers. [Availability](../library/intro.html#availability): Windows. Added in version 3.6. PYTHONCOERCECLOCALE[¶](#envvar-P...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
7e226f0d-e790-5888-82f9-9a5b557df6c9
docs
python
python_cmdline
315
53
* `C.UTF-8` * `C.utf8` * `UTF-8` If setting one of these locale categories succeeds, then the `LC_CTYPE` environment variable will also be set accordingly in the current process environment before the Python runtime is initialized. This ensures that in addition to being seen by both the int...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
db0767a1-7aff-5976-bbeb-910f2dd5f856
docs
python
python_cmdline
315
54
[error handler](../library/codecs.html#error-handlers) for [`sys.stdin`](../library/sys.html#sys.stdin "sys.stdin") and [`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)...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
099fab5e-fd2a-595f-a6d9-36a7276b9be7
docs
python
python_cmdline
315
55
order to force the interpreter to use `ASCII` instead of `UTF-8` for system interfaces. [Availability](../library/intro.html#availability): Unix. Added in version 3.7: See [**PEP 538**](https://peps.python.org/pep-0538/) for more details. PYTHONDEVMODE[¶](#envvar-PYTHONDEVMODE "Link to this definitio...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
06c844d9-d46f-5bbe-9530-d4921b7529c9
docs
python
python_cmdline
315
56
PYTHONWARNDEFAULTENCODING[¶](#envvar-PYTHONWARNDEFAULTENCODING "Link to this definition") : If this environment variable is set to a non-empty string, issue a [`EncodingWarning`](../library/exceptions.html#EncodingWarning "EncodingWarning") when the locale-specific default encoding is used. See [Opt-in Encod...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
41c7159c-d655-5241-b4cd-566a1705bec7
docs
python
python_cmdline
315
57
: 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. If set to `0`, disable Linux `perf` profiler support. See also the [`-X perf`](#cmdoption-X) command-line option and [Python support for the perf map compatible profi...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
76f08d48-c6a2-5a76-a8cb-484d3041ca4a
docs
python
python_cmdline
315
58
: If this variable is set to a non-empty string, it disables the remote debugging feature described in [**PEP 768**](https://peps.python.org/pep-0768/). This includes both the functionality to schedule code for execution in another process and the functionality to receive code for execution in the current...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
dd21b101-b4e0-59e0-9d50-51ba8879482d
docs
python
python_cmdline
315
59
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_315.md
c319bd5e-56f6-5266-a021-23667751458a
docs
python
python_cmdline
315
60
load the Python-based [REPL](../glossary.html#term-REPL) that requires [`readline`](../library/readline.html#module-readline "readline: GNU readline support for Python. (Unix)"), and will instead use the traditional parser-based [REPL](../glossary.html#term-REPL). Added in version 3.13. PYTHON\_HISTORY[¶]...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
56d0fc6f-7b72-5cc2-a346-a949097d1e2b
docs
python
python_cmdline
315
61
precedence over this variable, and [Free-threaded CPython](../whatsnew/3.13.html#whatsnew313-free-threaded-cpython). Added in version 3.13. PYTHON\_THREAD\_INHERIT\_CONTEXT[¶](#envvar-PYTHON_THREAD_INHERIT_CONTEXT "Link to this definition") : If this variable is set to `1` then [`Thread`](../library/threadi...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
8562e5d6-ecba-561b-9fc9-3b23954fc0ff
docs
python
python_cmdline
315
62
manager will use a [`ContextVar`](../library/contextvars.html#contextvars.ContextVar "contextvars.ContextVar") to store warnings filter state. If unset, this variable defaults to `1` on free-threaded builds and to `0` otherwise. See [`-X context_aware_warnings`](#cmdoption-X). Added in version 3.14...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
179a671b-5269-5f0b-abcf-8d398b47361b
docs
python
python_cmdline
315
63
### 1.2.1. Debug-mode variables[¶](#debug-mode-variables "Link to this heading") PYTHONDUMPREFS[¶](#envvar-PYTHONDUMPREFS "Link to this definition") : If set, Python will dump objects and reference counts still alive after shutting down the interpreter. Needs Python configured with the [`--with-trace-refs`]...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
8619d95e-d677-5079-8911-158f9f818486
docs
python
python_cmdline
315
64
early in the interpreter lifecycle, before the [`site`](../library/site.html#module-site "site: Module responsible for site-specific configuration.") module is executed, and before the [`__main__`](../library/__main__.html#module-__main__ "__main__: The environment where top-level code is run. Covers command-li...
large_dataset/raw/docs/python/cmdline/cmdline_315.md
7222fceb-44be-5806-bc33-f63c4e0ebc22
docs
python
python_cmdline
315
65
Needs Python configured with the [`--with-pydebug`](configure.html#cmdoption-with-pydebug) build option. Added in version 3.13.
large_dataset/raw/docs/python/cmdline/cmdline_315.md
ee1627e2-ad38-5ae1-b160-40af571a1e33
docs
python
python_cmdline
38
0
# 1.Command line and environment¶ Source: https://docs.python.org/3.8/using/cmdline.html Version: 3.8 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_38.md