I would like to create a subprocess of a process.
What would be a working example which shows how to accomplish this?
Based on user225312's answer, I prepared the below one liner, it may help you to test the subprocess:
python -c "import subprocess;
output = subprocess.Popen(['uname', '-a'], stdout=subprocess.PIPE).communicate()[0];
print output"
result like:
Linux xxx.xxx.xxx.xxx 3.10.0-957.1.3.el7.x86_64 #1 SMP Thu Nov 29 14:49:43 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux