September 2026
1051 pages
35h 4m
English
In the previous section, you learned about the os.system and os.popen functions, which allow you to run an external program from within a Python program. Technically speaking, this is referred to as starting a subprocess. In this section, we’ll look at the subprocess module of the standard library, which provides a comprehensive interface for starting subprocesses and communicating with them.
To run the examples in this section, you must first import the subprocess module:
>>> import subprocess
The module essentially provides the subprocess.run function, which offers a universal interface for starting subprocesses in various configurations.
In the following sections, we’ll provide an overview of typical ...
Read now
Unlock full access