我需要从我的 Python 脚本中执行这个脚本。
可能吗?该脚本生成一些输出,其中包含一些正在写入的文件。如何访问这些文件?我尝试过使用子进程调用功能,但没有成功。
fx@fx-ubuntu:~/Documents/projects/foo$ bin/bar -c somefile.xml -d text.txt -r aString -f anotherString >output
应用程序“bar”还引用了一些库,除了输出之外,它还创建文件“bar.xml”。如何访问这些文件?仅仅通过使用 open()?
谢谢,
编辑:
Python 运行时的错误只是这一行。
$ python foo.py
bin/bar: bin/bar: cannot execute binary file