Adding GUI to application

Mark Gash mgash at trisystems.co.uk
Fri Feb 22 04:24:21 EST 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
	synchronization issues.

Many Thanks for the pointer... Has anybody got any working examples of
Queues, for this situation???

Kind Regards,

Mark Gash
Consultant
TriSystems Ltd.
020 7264 0440
mgash at trisystems.co.uk






-----------------------------------------------------------------------
The information in this email is confidential and may be legally privileged.
It is intended solely for the addressee. Access to this email by anyone else
is unauthorised. If you are not the intended recipient, any disclosure,
copying, distribution, or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful. TriSystems Ltd. cannot
accept liability for statements made which are clearly the senders own.




More information about the Python-list mailing list