Need to interrupt to check for mouse movement

Peter Hansen peter at engcorp.com
Wed Jul 20 18:29:40 EDT 2005


stringy wrote:
> I have a program that shows a 3d representation of a cell, depending on
> some data that it receives from some C++. It runs with wx.timer(500),
> and on wx.EVT_TIMER, it updates the the data, and receives it over the
> socket.

It's generally inappropriate to have a GUI program do network 
communications in the main GUI thread.  You should create a worker 
thread and communicate with it using Queues and possibly the 
AddPendingEvent() or PostEvent() methods in wx.  There should be many 
easily accessible examples of how to do such things.  Post again if you 
need help finding them.

-Peter



More information about the Python-list mailing list