Problem with wxPython

Chris Mellon arkanes at gmail.com
Tue Jun 26 17:27:49 CEST 2007


On 6/26/07, Ali <neishabo at enst.fr> wrote:
> Hi
>
> I'm not sure if this is the right place to post, pardon me if it's not.
> I'm having a problem with an application written with wxpython. The frame
> seems only to refresh when moving my mouse of it, though i frequently call:
> frame.Refresh(True). In fact, that line is called by another thread, right
> after having modified some of the frames attributes.
>

In general, the wxpython-users list is a better source of wxPython
answers than c.l.p.

wxPython gui elements are not threadsafe unless otherwise indicated.
Don't make calls against gui objects from other threads. This includes
Refresh().

You can make this call in a threadsafe manner using wx.CallAfter like so:
wx.CallAfter(frame.Refresh, True)

<code snipped>



More information about the Python-list mailing list