Hi, I try to execute some complex shell commands with in python and obtain the output, I tried the following method:
For python 3.x:
import subprocess
cmd= some_complex_command_with_pipe_and_others
ps = subprocess.Popen
(cmd,shell=True,stdout=subprocess.PIPE,stderr=subprocess.STDOUT)
output = ps.communicate()[0].decode('utf8')
Is this the correct usage for this case?
Regards
--
https://mail.python.org/mailman/listinfo/python-list
