wxPython advice

V

vpr

Hi Guys

I have a question re. socketserver and wx.

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

Marinus
 
M

Miki Tebeka

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Cygwin)
Comment: GnuPT 2.7.2

iD8DBQFDXKpV8jAdENsUuJsRAvQeAJ44cOYRqWjhg6b62+rWCzJNdpYHOgCfaIes
LabC/xpe7kJTIWc/eaeWZYQ=
=8MXM
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,269
Messages
2,571,338
Members
48,025
Latest member
Rigor4

Latest Threads

Top