Lines Matching +full:- +full:- +full:enable +full:- +full:warnings
4 .\" groff -Tascii -man python.man | less
7 python \- an interpreted, interactive, object-oriented programming language
11 .B \-B
14 .B \-b
17 .B \-d
20 .B \-E
23 .B \-h
26 .B \-i
29 .B \-I
33 .B \-m
34 .I module-name
37 .B \-q
40 .B \-O
43 .B \-OO
46 .B \-P
49 .B \-s
52 .B \-S
55 .B \-u
59 .B \-v
62 .B \-V
65 .B \-W
69 .B \-x
72 .B \-X
76 .B \-?
80 .B \--check-hash-based-pycs
89 .B \--help
92 .B \--help-env
95 .B \--help-xoptions
98 .B \--help-all
102 .B \-c
107 \-
113 Python is an interpreted, interactive, object-oriented programming
116 The Python Library Reference documents built-in and standard types,
137 .B \-B
142 .B \-b
143 Issue warnings about str(bytes_instance), str(bytearray_instance)
144 and comparing bytes/bytearray with str. (-bb: issue errors)
146 .BI "\-c " command
151 .BI "\-\-check-hash-based-pycs " mode
152 Configure how Python evaluates the up-to-dateness of hash-based .pyc files.
154 .B \-d
158 .B \-E
162 .B \-h ", " \-? ", "\-\-help
165 .B "\-\-help\-env"
166 Prints help about Python-specific environment variables and exits.
168 .B "\-\-help\-xoptions"
169 Prints help about implementation-specific \fB\-X\fP options and exits.
172 .B "\-\-help\-all"
175 .B \-i
176 When a script is passed as first argument or the \fB\-c\fP option is
182 .B \-I
183 Run Python in isolated mode. This also implies \fB\-E\fP, \fB\-P\fP and \fB\-s\fP. In
185 site-packages directory. All PYTHON* environment variables are ignored, too.
189 .BI "\-m " module-name
197 .B \-O
200 adding .opt-1 before the .pyc extension.
202 .B \-OO
203 Do \fB-O\fP and also discard docstrings; change the filename for
204 compiled (bytecode) files by adding .opt-2 before the .pyc extension.
206 .B \-P
211 .B \-q
213 also suppressed in non-interactive mode.
215 .B \-s
218 .B \-S
221 and the site-dependent manipulations of
227 .B \-u
231 .B \-v
233 (filename or built-in module) from which it is loaded. When given
238 .B \-V ", " \-\-version
243 .BI "\-W " argument
248 The simplest settings apply a particular action unconditionally to all warnings
251 -Wdefault # Warn once per call location
252 -Werror # Convert to exceptions
253 -Walways # Warn every time
254 -Wall # Same as -Walways
255 -Wmodule # Warn once per calling module
256 -Wonce # Warn once per Python process
257 -Wignore # Never warn
261 .B -Wi
263 .B -Wignore .
270 .B -W ignore::DeprecationWarning
271 ignores all DeprecationWarning warnings.
275 field is as explained above but only applies to warnings that match
281 case-insensitive.
291 field matches the (fully-qualified) module name; this match is case-sensitive.
299 .B -W
302 .B -W
306 Warnings can also be controlled using the
308 environment variable and from within a Python program using the warnings
309 module. For example, the warnings.filterwarnings() function can be used to use
313 .BI "\-X " option
314 Set implementation-specific option. The following options are available:
316 -X faulthandler: enable faulthandler
318 -X showrefcount: output the total reference count and number of used
322 -X tracemalloc: start tracing Python memory allocations using the
324 traceback of a trace. Use -X tracemalloc=NFRAME to start tracing with a
327 -X importtime: show how long each import takes. It shows module name,
329 nested imports). Note that its output may be broken in multi-threaded
330 application. Typical usage is python3 -X importtime -c 'import asyncio'
332 -X dev: enable CPython's "development mode", introducing additional runtime
334 more verbose than the default if the code is correct: new warnings are
336 * Add default warning filter, as -W default
339 * Enable the faulthandler module to dump the Python traceback on a crash
340 * Enable asyncio debug mode
344 -X utf8: enable UTF-8 mode for operating system interfaces, overriding the default
345 locale-aware mode. -X utf8=0 explicitly disables UTF-8 mode (even when it would
348 -X pycache_prefix=PATH: enable writing .pyc files to a parallel tree rooted at the
351 -X warn_default_encoding: enable opt-in EncodingWarning for 'encoding=None'
353 -X no_debug_ranges: disable the inclusion of the tables mapping extra location
359 -X frozen_modules=[on|off]: whether or not frozen modules should be used.
362 -X int_max_str_digits=number: limit the size of int<->str conversions.
367 .B \-x
380 .B \-c
388 In non-interactive mode, the entire input is parsed before it is
400 .B \-c
404 .I '-c'.
417 control returns to the primary prompt; in non-interactive mode, the
427 conventions; ${prefix} and ${exec_prefix} are installation-dependent
451 If this is set to a non-empty string, don't automatically prepend a potentially
453 directory or an empty string. See also the \fB\-P\fP option.
458 are installation-dependent directories, both defaulting to
466 Non-existent directories are silently ignored.
490 If this is set to a non-empty string it is equivalent to specifying
491 the \fB\-O\fP option. If set to an integer, it is equivalent to
492 specifying \fB\-O\fP multiple times.
494 If this is set to a non-empty string it is equivalent to specifying
495 the \fB\-d\fP option. If set to an integer, it is equivalent to
496 specifying \fB\-d\fP multiple times.
498 If this is set to a non-empty string it is equivalent to specifying
499 the \fB\-B\fP option (don't try to write
503 If this is set to a non-empty string it is equivalent to specifying
504 the \fB\-i\fP option.
515 If this is set to a non-empty string it is equivalent to specifying the
516 \fB\-s\fP option (Don't add the user site directory to sys.path).
518 If this is set to a non-empty string it is equivalent to specifying
519 the \fB\-u\fP option.
521 If this is set to a non-empty string it is equivalent to specifying
522 the \fB\-v\fP option. If set to an integer, it is equivalent to
523 specifying \fB\-v\fP multiple times.
525 If this is set to a comma-separated string it is equivalent to
526 specifying the \fB\-W\fP option for each separate value.
561 If set to a non-empty string, Python will print statistics of the pymalloc
571 If this environment variable is set to a non-empty string, enable the debug
574 If this environment variable is set to a non-empty string, start tracing
582 If this environment variable is set to a non-empty string,
583 .IR faulthandler.enable()
587 This is equivalent to the \fB-X faulthandler\fP option.
595 .IR site-packages
597 .IR "python \-m pip install \-\-user" .
599 If this environment variable is set to a non-empty string, Python will
601 \fB\-X importtime\fP on the command line.
614 with \fB--disable-gil\fP.
615 .SS Debug-mode variables
618 \fB\--with-pydebug\fP build option.