wxpython, linux, multithreading (Xlib: unexpected async reply (sequence 0x187)!)
Jeremy Yallop
jeremy at jdyallop.freeserve.co.uk
Sat Aug 31 08:31:00 EDT 2002
* Ville Vainio
| I tried to run a program that runs ok on win32 on rh73, wxgtk and
| wxpython 2.3.2, the latest PythonCard, and got the following error:
|
| Xlib: unexpected async reply (sequence 0x187)!
|
| Apparently, this is because xlib doesn't like getting calls from many
| threads at once. Is this to be expected?
Yes.
| Is there anything that gets "periodically" executed in wxpython
| mainloop, like there is in tkinter, so that I could avoid
| manipulating the gui directly from another thread?
You can safely post events to the wxPython event queue from other
threads (using the wxPostEvent function). There's a demo (Thread.py)
in the wxPython distribution that shows how to do this.
Jeremy.
More information about the Python-list
mailing list