📅  最后修改于: 2022-03-11 14:45:13.048000             🧑  作者: Mango
from subprocess import Popen, PIPE
path = "echo"
pipe = Popen(path, stdout=PIPE)
text, err = pipe.communicate()
if(pipe.returncode==0)
print( text, err)