There are numerous writings on the web regarding this. All your
wxPython code needs to be in the main thread.
General idea is that if you need GUI work done in
other-than-main-thread(s) you communicate that to your main thread and
let the main thread do the GUI work. I do this with events which, so
far, works well.
···
On Sat, 2004-01-03 at 21:02, Todd G. Gardner wrote:
Hello Everyone,
I am not sure how to ask this question but as a newbie to wxPython here
goes. Please pardon my ignorance here.
My application shows wxFrame1. I would like to start another thread so that
I can open wxFrame2 and run them both simulteneously?
I am happy to research this if you would point me to any websites.
Thanks in advance,
Todd
---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwindows.org
For additional commands, e-mail: wxPython-users-help@lists.wxwindows.org
--
Jim West
CheckLogix -a Concord company
102 S. Tejon Ste 920, Colorado Springs, CO 80903
719.633.7005 x223 Fax: 719.633.7006 Cell: 719.660.5676
General idea is that if you need GUI work done in
other-than-main-thread(s) you communicate that to your main thread and
let the main thread do the GUI work. I do this with events which, so
far, works well.
I am not sure how to ask this question but as a newbie to wxPython here
goes. Please pardon my ignorance here.
My application shows wxFrame1. I would like to start another thread so that
I can open wxFrame2 and run them both simulteneously?
There is no need to have a thread per frame. The MainLoop can dispatch events to any number of top level windows just fine. The thing you may want to use alternate threads for is background processing or time consuming things so your GUI can remain responsive while the long running task is running. Just be sure to *not* call any GUI functions/methods from the thread or you'll run into problems. There are lots of examples in this list archive, the wiki and the demo about how to pass messages/events/etc. from the worker threads to the gui thread.
···
--
Robin Dunn
Software Craftsman http://wxPython.org Java give you jitters? Relax with wxPython!