Adding GUI to application
jeff at ccvcorp.com
Thu Feb 21 20:05:37 CET 2002
Simon Brunning wrote:
> Starting the threads up isn't too complicated - see the effbot's "Python
> Standard Library" for an example. (You can look at my copy - I'm only up the
> stairs, after all. <wink>)
Yes, the threading module is pretty simple to use.
> But then you need to get your two threads to communicate. I don't know how
> to do this, but I'd have a look at the Queue module if I were you.
Queue makes inter-thread communication a snap. In order for two threads to send
messages back and forth, you simply set up two Queues, one in each direction.
Drop 'message objects' (which can be anything that makes sense for your
application) into one end, pull them out the other in a different thread, and
everything pretty much just works--the Queue takes care of almost all of the
More information about the Python-list