[Tutor] pyserial question

Vicki Stanfield vicki at thepenguin.org
Tue Sep 23 10:28:00 EDT 2003


I am still unable to figure out how to test whether or not the device on
the other end of the serial connection is on. Is there a simple way to do
a conditional read that times out with an error after some given amount of
time. I am using pyserial version 1.18. When I open the port, I specify a
timeout of 1 second, but that doesn't seem to do what I expect it to.
Maybe I have to do something different with the write command to look for
an error code? Right now, it is simply:

port.write('\x09')

I don't see anything documented.


--vicki



More information about the Tutor mailing list