wxPython before MainLoop

Stephen Hansen apt.shansen at gmail.com
Thu Aug 9 22:26:23 EDT 2007


On 8/9/07, [david] <david at nospam.spam> wrote:
>
> I'm disappointed that I didn't get a wxPython solution.
>
> If the only way to get wxPython to correctly handle
> this simple task is to code around it, I don't think
> wxPython is really ready for Windows.


A thread *is* basically the right answer, though; so why does wxPython need
an "answer"? Python has one.

Alternatively, let the GUI load (and don't do the long-running-task) and
then do the long running task in an idle handler within the GUI. A bit at a
time.

Alternatively, from within the long-running-task, regularly do:

   if myApp.Pending():
       myApp.Dispatch()

That'll handle any pending UI events (so the main UI is responsive). But you
need to call it regularly during your main task-- if you don't want a
separate thread.

Is there a better place to ask?


The wxPython mailing list. http://wxpython.org/maillist.php

--5
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20070809/5e27554c/attachment.html>


More information about the Python-list mailing list