To learn Python, I'm adapting a board game to a network based games with server and clients. It took a while, but with a little help, I've learned about wxPython, wxglade, SPE so that I now have a prototype GUI up and running.
 
Now to get the network part up and running... The network will be sending commands, responses, and random queries.
 
I'm thinking about 3 approaches, but rather than beat my head against the wall, I was hoping to find out if any  of these are workable:
 
1) use sockets lib. Do socket send/recv generate any kind of event with an event id that can used with the wxPython window events? That is, I want to just sit and receive events such as OnPaint, OnButton, in the same loop as I receive "OnReceiveSocket" (or whatever it might be called).
 
2) create a separate thread which does a select then sends a wxPython compatible event which can be intermixed with OnPaint, etc (similar to option 1)
 
3) use SocketServer. I noticed the  SocketServer class refers to "request handler class" and "handle" functions. Do these generate any events which are wxPython compatible
 
You probably noticed I'm a little confused about what a wxPython compatible event is. I'm not sure if these events and their event handling are part of Python or something added by  and unique to wxPython.
 
Thanks, Mike
_______________________________________________
Tutor maillist  -  [EMAIL PROTECTED]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to