python <python script>

Run the python interpreter

Arguments

NameDescription
python script

Options

NameDescription
-c <command>Execute the Python code in command. command can be one or more statements separated by newlines, with significant leading whitespace as in normal module code
-m <python module>Module
-?, -h, --helpPrint a short description of all command line options
-V, --versionPrint the Python version number and exit
-bIssue a warning when comparing bytes or bytearray with str or bytes with int. Issue an error when the option is given twice (-bb)
-BIf given, Python won’t try to write .pyc files on the import of source modules
--check-hash-based-pycs <arg>Control the validation behavior of hash-based .pyc files. See Cached bytecode invalidation
-dTurn on parser debugging output (for expert only, depending on compilation options)
-EIgnore all PYTHON* environment variables, e.g. PYTHONPATH and PYTHONHOME, that might be set
-iWhen 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
-IRun 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
-ORemove assert statements and any code conditional on the value of __debug__
-OODo -O and also discard docstrings
-gDon’t display the copyright and version messages even in interactive mode
-RTurn 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
-sDon’t add the user site-packages directory to sys.path
-SDisable the import of the module site and the site-dependent manipulations of sys.path that it entails
-uForce the stdout and stderr streams to be unbuffered. This option has no effect on the stdin stream
-vPrint a message each time a module is initialized, showing the place (filename or built-in module) from which it is loaded
-W <arg>Warning control. Python’s warning machinery by default prints warning messages to sys.stderr
-xSkip the first line of the source, allowing use of non-Unix forms of #!cmd. This is intended for a DOS specific hack only
-X <arg>Reserved for various implementation-specific options