Hi!
I've been trying to use the example of the LongRunningTasks in the wiki (http://wiki.wxpython.org/index.cgi/LongRunningTasks) to execute an external application from the gui without having to wait for it to end.
However, if we run an external application which lasts for a while, e.g., running "wait 10" with a method like this:
def execute(command):
child = popen2.Popen3(command,capturestderr=True)
outdata = child.fromchild.read()
errdata = child.childerr.read()
err = child.wait()
return (outdata,errdata,err)
and attempt to abort the thread, this only happens when the external application ends its 10 seconds execution because the execution is continuous contrary to what happens with the incremental cycle example used on the wiki.
Any sugestion to get through this?
Tks in advance.
···
-----Original Message-----
From: Harald Stürzebecher [mailto:harald.stuerzebecher@gmail.com]
Sent: Sun 7/17/2005 9:06 AM
To: wxPython-users@lists.wxwidgets.org; phark52@yahoo.com
Cc:
Subject: Re: [wxPython-users] Multithreaded wxPython app.
2005/7/17, aa bb <phark52@yahoo.com>:
How would I get a seperate thread in my app to
interact with the main wxpython GUI?
You could try the "Threads" sample from the wxPython demo.
(Demo -> Process and Events -> Threads)
I want to be able
to open a window (wx.Frame) from the thread. How can I
have this interact with my main app?
http://wiki.wxpython.org/index.cgi/LongRunningTasks
The demo and the wxPython wiki are always good places to start looking at.
Hope that helped,
Harald Stürzebecher
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org