473,404 Members | 2,178 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,404 software developers and data experts.

wxPython advice

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

Oct 17 '05 #1
1 1321
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 <mt*****@qualcomm.com>
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+rWCz JNdpYHOgCfaIes
LabC/xpe7kJTIWc/eaeWZYQ=
=8MXM
-----END PGP SIGNATURE-----

Oct 24 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Rick Muller | last post by:
I have a problem that I would like to get some advice on from other Pythonistas. I currently manage a (soon to be) open source project for displaying molecular graphics for a variety of different...
0
by: GuyBrush Treepwood | last post by:
I just compiled and installed wxWidgets and wxPython. When I want to test this libraries, I get: Python 2.4 (#1, Feb 19 2005, 19:24:31) on linux2 Type "help", "copyright", "credits" or...
2
by: rodmc | last post by:
I am totally new to Python and WxPython and need to write an application which can open up an external windows from a plug-in within GAIM (using pyGAIM). I have managed to hack some code together...
5
by: Andrew P | last post by:
Hello, I am new (very) to Python and have just down loaded the latest version of Python (2.5) and WXPython (2.8). For some reason I cannot get the WXPython demo to run at all. I run windows...
1
by: Eric von Horst | last post by:
Hi, I need some advice on Drag&Drop. What I want to achieve is the following: - I have a window that is divided in two : on the left hand I have a wx.TreeCtlr and on the other hand a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.