serial port and event loop question

David Fisher python at rose164.wuh.wustl.edu
Tue Apr 25 12:32:09 CEST 2000


----- Original Message -----
From: <bgue at my-deja.com>
Newsgroups: comp.lang.python
To: <python-list at python.org>
Sent: Thursday, April 20, 2000 9:24 PM
Subject: serial port and event loop question


> Hi everyone. This is mostly a general programming question, but since
> I'm using Python for this project, I thought I'd ask here... I wrote
> database written with Python and Gadfly, and I've got a nice little
> Tkinter GUI for it. I need to make it monitor the serial port for
> incoming data (from a barcode scanner). I'm using the Serial module,
> but I don't know how to have my program watch for new data
> constantly...any help?
>


Hi,
If you're talking about the win32 serial io module, you don't need to do
anything special for it to watch for new data.  It buffers the incoming data
until you read() or readTerminated() to get the data.
Good luck,
David





More information about the Python-list mailing list