【发布时间】:2012-07-10 18:32:43
【问题描述】:
如何指定python模块子进程用来执行命令的目录?我想运行一个 C 程序并在 Python 中近乎实时地处理它的输出。
我想执行命令(这将为我的 C 程序运行我的 makefile:
make run_pci
在:
/home/ecorbett/hello_world_pthread
我还想用 Python 处理 C 程序的输出。我是 Python 新手,因此将不胜感激示例代码!
谢谢, 爱德华
【问题讨论】:
标签: python subprocess