## -d 

Turn on parser debugging output (for expert only, depending on compilation options). See also PYTHONDEBUG . 

## -E 

Ignore all$_{PYTHON*}$ environment variables, e.g. PYTHONPATH and PYTHONHOME , that might be set. 

## -i 

When a script is passed as first argument or the -c option is used, enter interactive mode after executing the script or the command, even when$_{sys.stdin}$does not appear to be a terminal. The PYTHONSTARTUP file is not read. 

This can be useful to inspect global variables or a stack trace when a script raises an exception. See also PYTHONINSPECT . 

## -I 

Run Python in isolated mode. This also implies -E and -s. In isolated mode sys.path contains neither the script’s directory nor the user’s site-packages directory. All PYTHON* environment variables are ignored, too. Further restrictions may be imposed to prevent the user from injecting malicious code. 

New in version 3.4. 

## -O 

Remove assert statements and any code conditional on the value of __debug__ . Augment the filename for compiled ( bytecode ) files by adding .opt-1 before the $_{.pyc}$extension (see PEP 488 ). See also PYTHONOPTIMIZE . 

Changed in version 3.5: Modify$_{.pyc}$ filenames according to PEP 488 . 

## -OO 

Do $_{-O}$and also discard docstrings. Augment the filename for compiled ( bytecode ) files by adding$_{.opt-2}$ before the$_{.pyc}$ extension (see PEP 488 ). 

Changed in version 3.5: Modify$_{.pyc}$ filenames according to PEP 488 . 

## -q 

Don’t display the copyright and version messages even in interactive mode. 

New in version 3.2. 

## -R 

Turn on hash randomization. This option only has an effect if the PYTHONHASHSEED environment variable is set to$_{0}$ , since hash randomization is enabled by default. 

On previous versions of Python, this option turns on hash randomization, so that the$_{__hash__()}$ values of str and bytes objects 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 that exploit the worst case performance of a dict construction, O(n^2) complexity. See http://www. ocert.org/advisories/ocert-2011-003.html for details. 

PYTHONHASHSEED allows you to set a fixed value for the hash seed secret. 

Changed in version 3.7: The option is no longer ignored. 

New in version 3.2.3. 

## -s 

Don’t add the$_{user site-packages directory}$ to$_{sys.path}$ . 

See also: 

PEP 370 – Per user site-packages directory 

## -S 

Disable the import of the module$_{site}$ and the site-dependent manipulations of$_{sys.path}$that it entails. Also disable these manipulations if$_{site}$ is explicitly imported later (call$_{site.main()}$ if you want them to be triggered). 

