In Python you have to use the sub-process. The subprocess module is very useful and provides many functionality.
I allows the developer to write program which can spawn a new processes and connect with main process with input/output/error pipes.
You can to use the sub process to achieve this.
For example following code:
from subprocess import call
Above command calls the external ls -l Linux command. This way you can easily call external program /command from Python main program.