Re: wx.Execute和wx.Process的问 题,急!
zinicl <[email protected]> Fri, 25 Jan 2008 15:50:00 +0800
| Newsgroups | gmane.comp.python.chinese |
|---|---|
| Message-ID | <[email protected]> |
因为是异步,而且不想显示命令行窗口,捕获输出后,还要进一步加工才显示在界面上 在08-1-25,Joey <[email protected]> 写道: > > 为什么不用os.system() 或者 popen? > > > > 2008/1/25 zinicl <[email protected]>: > > > 用wx.Execute(self.edit_file_server.GetValue(), wx.EXEC_ASYNC, > > thread.processServer)启动了一个命令行程序,并且用 > > stream = self.processServer.GetInputStream() > > if stream is not None and stream.CanRead(): > > qslog = stream.read() > > 将标准输出捕获,经过测试发现输出不能及时被捕获,好像必须在缓冲满了以后才能被wxPython捕获,怎样才能使wxPython及时抓到这个命令行程序的输出?谢谢! > > > > > > _______________________________________________ > > python-chinese > > Post: send [email protected] > > Subscribe: send subscribe to [email protected] > > Unsubscribe: send unsubscribe to [email protected] > > Detail Info: http://python.cn/mailman/listinfo/python-chinese > > > > > > -- > Best Regard, > Tang, Jiyu (Joey) > _______________________________________________ > python-chinese > Post: send [email protected] > Subscribe: send subscribe to [email protected] > Unsubscribe: send unsubscribe to [email protected] > Detail Info: http://python.cn/mailman/listinfo/python-chinese > _______________________________________________ python-chinese Post: send [email protected] Subscribe: send subscribe to [email protected] Unsubscribe: send unsubscribe to [email protected] Detail Info: http://python.cn/mailman/listinfo/python-chinese