Chinaunix
标题:
请问在subprocess中的Popen有没有returncode这个属性?
[打印本页]
作者:
slother
时间:
2013-04-25 10:44
标题:
请问在subprocess中的Popen有没有returncode这个属性?
如题。Python版本为2.7. 在帮助文档中看到下面这段文字:
Popen.returncode
The child return code, set by poll() and wait() (and indirectly by communicate()). A None value indicates that the process hasn’t terminated yet.
复制代码
按照帮助文档,Popen应该是有returncode的属性的。但是实际使用过程中,Python会提示Popen找不到这个属性。
另外,请问使用Popen运行子程序,还有其他方法得到子程序的返回值么?我需要得到子程序的返回值来进行下一步操作。
作者:
laike9m
时间:
2013-04-25 13:45
子程序是.py吗?还是个exe?
作者:
slother
时间:
2013-05-03 18:02
回复
2#
laike9m
子程序是一个exe
欢迎光临 Chinaunix (http://bbs.chinaunix.net/)
Powered by Discuz! X3.2