still enhancing Linux behavior of wxPopen
authoretisserant
Fri, 23 May 2008 19:33:17 +0200
changeset 151 43614ea83d2a
parent 150 204d515df3dd
child 152 9abf2ac9cb8e
still enhancing Linux behavior of wxPopen
wxPopen.py
--- a/wxPopen.py	Fri May 23 18:48:03 2008 +0200
+++ b/wxPopen.py	Fri May 23 19:33:17 2008 +0200
@@ -49,10 +49,10 @@
         while self.retval is None and not self.killed :
             self.retval = self.Proc.poll()
             outchunk = self.fd.readline()
-            if outchunk == '':
-                break
+            #if outchunk == '':
+            #    break
             if self.callback :
-                wx.CallAfter(self.callback,outchunk)
+                self.callback(outchunk)
         if self.endcallback:
             try:
             	err = self.Proc.wait()
@@ -109,13 +109,13 @@
         self.outdata += v
         self.outlen += 1
         if not self.no_stdout:
-            self.logger.write(v)
+            wx.CallAfter(self.logger.write,v)
 
     def errors(self,v):
         self.errdata += v
         self.errlen += 1
         if not self.no_stderr:
-            self.logger.write_warning(v)
+            wx.CallAfter(self.logger.write_warning,v)
 
     def finish(self, pid,ecode):
         self.finished = True