tkinter & serial port
cliechti at gmx.net
Sun Sep 29 18:55:58 EDT 2002
user at domain.invalid wrote in news:IhKl9.45766$bX.8904 at sccrnsc02:
> 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.
> How do I do this or its moral equivalent under Python so that it
> runs without modification under both BSD and Windows?
you can hook in an "idle function" in most gui toolkits. that function
could poll the serial port then. (select is out of question on wiondowze
i do prefer threads: start a worker thread that handled the serial IO and
the main thread serves the GUI. that's the module "threading" and search
for aahz page and the threding intro. (url found on all his messages' sig)
adv: for an easy serial port handling on both platforms i can sugest my
Chris <cliechti at gmx.net>
More information about the Python-list