Non blocking tty I/O

Yun Mao maoy_REMOVE_IF_NOT_SPAM at cis.upenn.edu
Thu Aug 14 00:11:31 EDT 2003


You may want to use select to test if the bits are available or not.
http://www.python.org/doc/current/lib/module-select.html

Yun

"Mike solem" <msolem at firstlinux.net> wrote in message
news:1104_1060829342 at news-server.optonline.net...
> I'm reading data from the comport on linux, using 'read(1)'.  This blocks
until it gets a byte.  How can I get it to not block, so that it doesn't
hang forever waiting for a byte.
>
> Mike
>
>
>






More information about the Python-list mailing list