Here are supporting materials for the Real Python tutorial The subprocess
Module: Wrapping Programs With Python.
Be aware that some examples are designed for particular operating systems. The basics_unix.py
file won't work on Windows, for instance.
You'll find quick descriptions of what the different scripts do in the docstring of each file.