In this section, you will learn how to execute and control other programs from within our own, allowing us to create the heart of our example program. This ability is often useful for all sorts of system automation tasks. Create an echo.py file with the following content:
Making other programs run used to be something of a mess. There were different mechanisms that worked on different platforms, there were mechanisms that were convenient and there were different mechanisms that were secure. Fortunately, all that changed since Python version 2.4 with the introduction of the subprocess module, which abstracts away the differences between platforms and makes some more secure paradigms easy to use.