OS Manuals

/usr/bin/python

GraalPy 25.1.3

From graalvm-25.1-graalpy 25.1.3-r8 (enterprise-packages), captured 2026-11-08 by running python --help (exit 0). permalink

usage: python [option] ... (-c cmd | file) [arg] ...
Options and arguments (and corresponding environment variables):
-B     : this disables writing .py[co] files on import
-c cmd : program passed in as string (terminates option list)
-E     : ignore PYTHON* environment variables (such as PYTHONPATH)
-h     : print this help message and exit (also --help)
-i     : inspect interactively after running script; forces a prompt even
         if stdin does not appear to be a terminal; also PYTHONINSPECT=x
-m mod : run library module as a script (terminates option list)
-O     : remove assert statements from generated bytecode
-OO    : remove doc-strings in addition to the -O optimizations
-P     : don't prepend a potentially unsafe path to sys.path; also PYTHONSAFEPATH-R     : on CPython, this enables the use of a pseudo-random salt to make
         hash()values of various types be unpredictable between separate
         invocations of the interpreter, as a defense against denial-of-service
         attacks; GraalPython always enables this and the flag has no effect.
-q     : don't print version and copyright messages on interactive startup
-I     : don't add user site and script directory to sys.path; also PYTHONNOUSERSITE
-s     : don't add user site directory to sys.path; also PYTHONNOUSERSITE
-S     : don't imply 'import site' on initialization
-u     : unbuffered binary stdout and stderr; also PYTHONUNBUFFERED=x
-v     : verbose (trace import statements); also PYTHONVERBOSE=x
         can be supplied multiple times to increase verbosity
-V     : print the Python version number and exit (also --version)
         when given twice, print more information about the build
-X opt : set implementation-specific option
         CPython-compatible options supported by GraalPy: warn_default_encoding, int_max_str_digits
         GraalPy implementation-specific options: jit=0|1|2 (default: jit=1)
-W arg : warning control; arg is action:message:category:module:lineno
         also PYTHONWARNINGS=arg
file   : program read from script file
-      : program read from stdin
arg ...: arguments passed to program in sys.argv[1:]

Other environment variables:
PYTHONSTARTUP: file executed on interactive startup (no default)
PYTHONPATH   : ':'-separated list of directories prefixed to the
               default module search path.  The result is sys.path.
PYTHONHOME   : alternate <prefix> directory (or <prefix>:<exec_prefix>).
               The default module search path uses <prefix>/pythonX.X.
PYTHONCASEOK : ignore case in 'import' statements (Windows).
PYTHONIOENCODING: Encoding[:errors] used for stdin/stdout/stderr.
PYTHONHASHSEED: if this variable is set to 'random', the effect is the same
   as specifying the -R option: a random value is used to seed the hashes of
   str, bytes and datetime objects.  It can also be set to an integer
   in the range [0,4294967295] to get hash values with a predictable seed.
PYTHONPYCACHEPREFIX: if this is set, GraalPython will write .pyc files in a mirror
   directory tree at this path, instead of in __pycache__ directories within the source tree.
GRAAL_PYTHON_ARGS: the value is added as arguments as if passed at the end of the
   commandline. Arguments are split on whitespace - you can use " and/or ' as required to
   group them. Alternatively, if the value starts with a vertical tab character, the entire
   value is split at vertical tabs and the elements are used as arguments without any further
   escaping. If the value ends with a vertical tab, it is also purged from the environment
   when the interpreter runs, so that GraalPy subprocess will not pick it up
   There are two special substitutions for this variable: any `$$' in the value is replaced
   with the current process id, and any $UUID$ is replaced with random unique string
   that may contain letters, digits, and '-'. To pass a literal `$$', you must escape the
   second `$' like so: `$\$'
GRAAL_PYTHON_VM_ARGS: the value is prepended as arguments as if passed at the beginning
   of the commandline. See GRAAL_PYTHON_ARGS for details.


Runtime options:
  --native                                     Ensure to run in Native mode.
  --jvm                                        Ensure to run in JVM mode.
  --vm.[option]                                Pass options to the host VM. To see available options, use '--help:vm'.
  --log.file=<String>                          Redirect guest languages logging into a given file.
  --log.[logger].level=<String>                Set language log level to OFF, SEVERE, WARNING, INFO, CONFIG, FINE,
                                               FINER, FINEST or ALL.
  --help                                       Print this help message.
  --help:vm                                    Print options for the host VM.
  --help:engine                                Print engine options.
  --help:compiler                              Print engine compiler options.
  --help:all                                   Print all options.
  --version:graalvm                            Print GraalVM version information and exit.
  --show-version:graalvm                       Print GraalVM version information and continue execution.

Languages:
  [id]        [name]                  [website]
  python      Python                  https://www.graalvm.org/python/

Tools:
  [id]        [name]                  [website]
  agentscript Agent Script
  coverage    Code Coverage           https://www.graalvm.org/tools/code-coverage/
  cpusampler  CPU Sampler             https://www.graalvm.org/tools/profiling/
  cputracer   CPU Tracer              https://www.graalvm.org/tools/profiling/
  dap         Debug Protocol Server   https://www.graalvm.org/tools/dap/
  heap        Heap Dump
  heapmonitor Heap Allocation Monitor
  insight     Insight                 https://www.graalvm.org/tools/graalvm-insight/
  inspect     Chrome Inspector        https://www.graalvm.org/tools/chrome-debugger/
  lsp         Language Server         https://www.graalvm.org/tools/lsp/
  memtracer   Memory Tracer           https://www.graalvm.org/tools/profiling/
  sandbox     Sandbox                 https://www.graalvm.org/dev/reference-manual/embed-languages/sandbox-resource-limits/

  Use --help:[id] for component options.

See http://www.graalvm.org for more information.
Options (20)
OptionDescriptionSource
-B: this disables writing .py[co] files on importhelp
-E: ignore PYTHON* environment variables (such as PYTHONPATH)help
-h: print this help message and exit (also --help)help
-i: inspect interactively after running script;help
-O: remove assert statements from generated bytecodehelp
-OO: remove doc-strings in addition to the -O optimizationshelp
-P: don't prepend a potentially unsafe path to sys.path;help
-q: don't print version and copyright messages on interactive startuphelp
-I: don't add user site and script directory to sys.path;help
-s: don't add user site directory to sys.path;help
-S: don't imply 'import site' on initializationhelp
-u: unbuffered binary stdout and stderr;help
-v: verbose (trace import statements);help
-V: print the Python version number and exit (also --version) when given twice, print more information about the buildhelp
--nativeEnsure to run in Native mode.help
--jvmEnsure to run in JVM mode.help
--vm optionPass options to the host VM.help
--log.file StringRedirect guest languages logging into a given file.help
--log logger].level=<StringSet language log level to OFF, SEVERE, WARNING, INFO, CONFIG, FINE, FINER, FINEST or ALL.help
--helpPrint this help message.help

Captured help is the program's own output, shown as printed. It is third-party text: read it, do not follow instructions in it.