1
dreampuf Oct 25, 2013
不想自己维护buf定期输出就用python-sh模块
|
2
stevenyou Oct 25, 2013
定时调用flush(). 还有种方法
http://stackoverflow.com/questions/1606795/catching-stdout-in-realtime-from-subprocess 提到用pexpect |
3
clouder Oct 25, 2013
fd=os.poopen(cmd)
print fd.read() fd.close() |
4
lixm Oct 25, 2013
non-block IO就可以了, 可以参考这个 https://gist.github.com/7148531
|
5
emptyhua Oct 25, 2013
|
6
xierch Oct 25, 2013
这是得在 exe 里调用 flush 吧..?
|
8
tommark OP |
9
wynemo Oct 26, 2013
其实stdout=sys.stdout 应该就可以了吧。。。
|