ID EN
OS

system

Python 3.11

Execute the command (a string) in a subshell. This is implemented by calling the Standard C function system(), and has the same limitations. Changes to sys.stdin, etc. are not reflected in the environment of the executed command. If command generates any output, it will be sent to the interpreter standard output stream. The C standard does not specify the meaning of the return value of the C function, so the return value of the Python function is system-dependent.

Syntax

PYTHON
os.system(command)

See Also

sys.stdin wait() subprocess subprocess waitstatus_to_exitcode() auditing event Availability