IPython:从子进程获取返回状态

时间:2011-08-17 15:00:54

标签: ipython

我正在使用IPythons getoutput()在后​​台运行一个进程。这很好,因为它没有在我的机器上打开一个单独的窗口(我在Spyder IDE中使用了IPython shell)。

有没有办法从子流程中捕获返回状态?

1 个答案:

答案 0 :(得分:0)

查看子流程模块:http://docs.python.org/library/subprocess.html
具体来说,看看popen()。