wxPython issues

Francesco scrutinizer at gmx.at
Mon Feb 2 15:56:07 EST 2004


On Sun, 01 Feb 2004 16:10:37 -0800, Josiah Carlson
<jcarlson at nospam.uci.edu> wrote:

Hello Josiah,

thank you for your answer,

>
>>     #wxpython: do not use this
>>     ????#wxYield()
>>     #//wait for GUI to end with owerwrite dialog
>
>wxYield only makes sense when called from the main thread.  The main 
>thread should be the only thread that is handling GUI events.

Aha; the original program used this in a worker thread.

>
>
>What I would do is:
>     def OnOverwriteDlg(self, event):
>         print "OnOverwriteDlg"
>         dlg = COverwriteDlg ()
>         dlg.m_strInfo = g_strTitle
>         g_nGuiResult = dlg.ShowModal()
>         print g_nGuiResult
>         return g_nGuiResult
>
>Toss the semaphores, toss the worker threads, etc.  If saving takes so 
>much time, then you can do what I describe farther down.
>

No, the thing is:

It is a (still primitive) filemanager, where copy should be run in a
worker thread
in background (you can copy 1 GB file), and you should be able to work
with the
program without waiting

>[snip]

Thanks for this clarification

regards,
-- 
Francesco



More information about the Python-list mailing list