Skip to content

python

python documentation

footman._stubs.python.Python

Bases: Tool

__call__

__call__(
    *args: str,
    B: _Flag = ...,
    E: _Flag = ...,
    I: _Flag = ...,
    O: _Flag = ...,
    OO: _Flag = ...,
    P: _Flag = ...,
    S: _Flag = ...,
    V: _Flag = ...,
    W: _Value = ...,
    X: _Value = ...,
    b: _Flag = ...,
    c: _Value = ...,
    check_hash_based_pycs: _Value = ...,
    d: _Flag = ...,
    h: _Flag = ...,
    help_all: _Flag = ...,
    help_env: _Flag = ...,
    help_xoptions: _Value = ...,
    i: _Flag = ...,
    m: _Value = ...,
    q: _Flag = ...,
    s: _Flag = ...,
    u: _Flag = ...,
    v: _Flag = ...,
    x: _Flag = ...,
    **flags: Any,
) -> Result

Run this verb.

Parameters:

Name Type Description Default
B _Flag

don't write .pyc files on import; also PYTHONDONTWRITEBYTECODE=x.

...
E _Flag

ignore PYTHON* environment variables (such as PYTHONPATH).

...
I _Flag

isolate Python from the user's environment (implies -E and -s).

...
O _Flag

remove assert and debug-dependent statements; add .opt-1 before .pyc extension; also PYTHONOPTIMIZE=x.

...
OO _Flag

do -O changes and also discard docstrings; add .opt-2 before .pyc extension.

...
P _Flag

don't prepend a potentially unsafe path to sys.path; also PYTHONSAFEPATH.

...
S _Flag

don't imply 'import site' on initialization.

...
V _Flag

print the Python version number and exit (also --version) when given twice, print more information about the build.

...
W _Value

warning control; arg is action:message:category:module:lineno also PYTHONWARNINGS=arg.

...
X _Value

set implementation-specific option.

...
b _Flag

issue warnings about converting bytes/bytearray to str and comparing bytes/bytearray with str or bytes with int.

...
c _Value

program passed in as string (terminates option list).

...
check_hash_based_pycs _Value

control how Python invalidates hash-based .pyc files.

...
d _Flag

turn on parser debugging output (for experts only, only works on debug builds); also PYTHONDEBUG=x.

...
h _Flag

print this help message and exit (also -? or --help).

...
i _Flag

inspect interactively after running script; forces a prompt even if stdin does not appear to be a terminal; also PYTHONINSPECT=x.

...
m _Value

run library module as a script (terminates option list).

...
q _Flag

don't print version and copyright messages on interactive startup.

...
s _Flag

don't add user site directory to sys.path; also PYTHONNOUSERSITE=x.

...
u _Flag

force the stdout and stderr streams to be unbuffered; this option has no effect on stdin; also PYTHONUNBUFFERED=x.

...
v _Flag

verbose (trace import statements); also PYTHONVERBOSE=x can be supplied multiple times to increase verbosity.

...
x _Flag

skip first line of source, allowing use of non-Unix forms of #!cmd.

...