[wxPython-users] How to update window ?
Andrea Gavana
andrea.gavana at gmail.com
Sun Sep 3 13:36:41 PDT 2006
Hello Magnus,
> it's doing heavy fileoperation and compression and the window looses
> focus it will not update until the program is finnished with this
> operation. In what way can i make it update the window during the
> operation?
If you are doing things inside a for/while loop, you can try calling
wx.Yield() somewhere in your loop. A more elegant solution would be to
use threads (or even a separate process): in this case, I would like
to suggest you to take a look at:
1) LongRunningTasks: http://wiki.wxpython.org/index.cgi/LongRunningTasks
2) The thread example in the wxPython demo;
3) The Process/Execute example in the wxPython demo;
4) The very interesting discussion Josiah and others had few days ago,
about threads, wx.Yield and friends.
HTH.
Andrea.
"Imagination Is The Only Weapon In The War Against Reality."
http://xoomer.virgilio.it/infinity77/
More information about the wxpython-users
mailing list