looking for UDP package, network programming guidance

Tom Plunket tomas at fancy.org
Mon Jul 7 12:52:08 EDT 2003


Hey all-

A friend of mine has built this interesting (to me) bit of
hardware that's intended to communicate with a PC over ethernet.
The hardware has an OS written in C, and has some PC-side testing
software written in Delphi, all of which I have access to.  The
hardware communicates with the PC via UDP.

I've been working on porting the PC "test" software to Python so
that 1) I understand the code, 2) don't need to go buy Delphi to
help this guy out, and 3) learn enough about network programming
to write the actual application interface software for off-the-
shelf software to use this hardware.  I spent a bunch of hours
one night learning everything I needed to about wxPython to get a
not-so-fancy but needs-a-lot-of-different-UI-elements test app UI
running, but now the stumbling block comes up that Python doesn't
seem to have any UDP handling built into its distribution.

Searching the web turned up Twisted, although it seems like it
might be a bit bigger than I would have hoped (in terms of,
"there's a huge package here to figure out"), but as far as I can
tell it's the only UDP solution out there.  Is this the case?

Additionally, the networking protocol is a fixed format packed
bytes sort of thing; is it easy enough in Python (with Twisted)
to read bytes off of the stream and then decide what to do with
them?  (I'm a Python newbie but somewhat of a C++ pro.)

Finally, I'm also somewhat of a babe in the woods with network
programming in general.  Any good references for learning about
this stuff, something that goes over issues of robustness, error
handling strategies, and so forth?  It'd be best if anything had
"tutorials" written in Python, of course.  ;)

thanks,
-tom!




More information about the Python-list mailing list