Python Subprocess Module
Subprocess management — run, Popen, call, PIPE, CalledProcessError. This category documents 9 Python subprocess module entries, and each page gives you the full syntax, the parameter list, the return value, and a runnable example. The entries include: subprocess.run(), subprocess.Popen(), Popen.communicate(), subprocess.call(), subprocess.check_output(), subprocess.check_call(), subprocess.PIPE, subprocess.DEVNULL, subprocess.CalledProcessError. subprocess.run() runs a command and waits for it to complete. Returns a CompletedProcess instance. subprocess.Popen() executes a child program in a new process (lower-level than run()). Popen.communicate() sends data to stdin and reads from stdout/stderr until EOF. subprocess.call() runs a command and returns its return code (legacy API, use run() instead). subprocess.check_output() runs a command and returns its output as bytes. Raises CalledProcessError on failure. For a structured walkthrough of the whole topic, read the Subprocess Module guide. Subprocess Module belongs to the Concurrency & Networking group alongside Threading Module, Concurrent Module, Asyncio Module, Urllib Module.