tkinter & serial port

user at domain.invalid user at domain.invalid
Sun Sep 29 17:30:17 EDT 2002

Please excuse this if it is a FAQ.

I'm new with Python/Tkinter, but have written LOTS of X windows code.
This may be the root of my problem.

My program needs to talk over a serial port to a device AND update
the display. I get about 10 lines of text every second or so.
Under X Windows, I would simply open the serial device
and add it to the select list which would then cause Xt to give
me a callback whenever there is input available. I can set the I/O
port to understand lines which makes the whole thing neat and clean.

How do I do this or its moral equivalent under Python so that it
runs without modification under both BSD and Windows? The closest
that I've been able to figure out is to poll the serial device
a few times per second. This is ugly, involves overhead and generally
not up to the standard of Python -- clearly I don't yet 'see the light.'

Suggestions? Pointers? Ideas?

More information about the Python-list mailing list