python subprocess popen code example
Example 1: python subprocess exception handling
try:
subprocess.check_output(...)
except subprocess.CalledProcessError as e:
print(e.output)
Example 2: subprocess .POPen echo
proc=subprocess.Popen('echo hello world', shell=True, stdout=subprocess.PIPE)