I would like to create a subprocess of a process.
What would be a working example which shows how to accomplish this?
Start with the subprocess documentation.
If you want to get the output:
>>> import subprocess
>>> output = subprocess.Popen(['uname', '-a'], stdout=subprocess.PIPE).communicate()[0]
>>> output
'Linux'
If you just want to call and not deal with the output:
>>> subprocess.call(['echo', 'Hi'])
Hi
0
subprocess.check_call is the same except that it throws up a CalledProcessError
in case the command is called with invalid parameters.
A good subprocess tutorial.