Checking for data on a serial port

Erno Kuusela erno at
Wed Mar 29 00:34:37 CEST 2000

>>>>> "Jay" == Jay Freeman <jayfreeman at> writes:

    Jay> Howdy, I'm probably missing something obvious in the docs,
    Jay> but I'd like to have a way to see if there is any data
    Jay> waiting to be read on a serial port.

use the select module.

you might want to open the serial ports in unbuffered mode, or use the
low level syscalls, so that buffering doesn't get in
the way.

  -- erno

More information about the Python-list mailing list