错误信息:
Failed to open output_file_path/**.txt
代码:
cmd = 'showTxt "%s" > "%s"' % (file_path, output_file_path)
LoggerInstance.log('[cmd] '+cmd)
#os.system(cmd)
splited_cmd=shlex.split(cmd)
p = subprocess.Popen(splited_cmd, stderr=subprocess.PIPE)
#p.wait()
output = p.stderr.read()
print output
LoggerInstance.log('[console std error]'+ output)
如何将标准输出重定向到 cmd 中的文件?