windows
p = subprocess.Popen(comment, shell=False, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
linux
p = subprocess.Popen(comment, shell=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
错误的返回结果
p.poll()
rc为程序返回结果,out打印结果
rc, out = subprocess.getstatusoutput(comment)