Hello vpr,

> I've written a p2p program using socketserver that's nice and quick.
> I'd like to give the user a tray applet (part of the p2p service) that
> will allow the user to activate / deactivate / config and exit the
> service.
> However I'm starting to bang my head on the mainloop funtions that
> manage
> wx and socket events.
> 
> Anyone been down this road that can give me some advice
One common solution is to do all the work in a "worker thread" and keep the
GUI responsive to command.

Note that Python don't have native support to pause/resume threads. You'll
need to get your thread to check for new state every now and then. (Usually
this means keep transactions small) or use processes instead of threads
(see http://home.pacbell.net/ouster/threads.pdf).

You might want to use async socket reading as well.

HTH.
--
------------------------------------------------------------------------
Miki Tebeka <[EMAIL PROTECTED]>
http://tebeka.bizhat.com
The only difference between children and adults is the price of the toys

Attachment: pgpHBwZbzOv3s.pgp
Description: PGP signature

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to