Information about how the subprocess module can be used to replace these modules and functions can be found in the following sections. Using the subprocess Module¶ The recommended approach to invoking subprocesses is to use the run() function for all use cases it can handle. For more advanced use cases, the underlying Popen interface can be used directly. subprocess.run(args, *, stdin=None, input=