【发布时间】:2019-10-05 04:53:22
【问题描述】:
当从命令行运行它时,这是有效的
plutil -convert xml1 test.out -o outFile1.xml
在 python 2.7 中运行时出现错误:
import subprocess
subprocess.check_output(["plutil -convert xml1 test.out -o outFile1.xml"])
OSError: [Errno 2] No such file or directory
我尝试将./ 或.\\ 添加到目录中。
我使用pwd 和os.getcwd() 来确保我在这两种情况下都从同一个目录运行它。
【问题讨论】:
标签: python command-line subprocess