On 11/29/2010 1:44 PM John Smith said...
But, when I tried it in Python, I got the same as before:

 >>> import serial
 >>> ser = serial.Serial(0, timeout = 1)

out of curiosity, if you change the timeout above to 5....

 >>> ser
Serial<id=0x225c240, open=True>(port='COM1', baudrate=9600, bytesize=8,
parity='N', stopbits=1, timeout=1, xonxoff=False, rtscts=False,
 >>> ser.read()

... does the delay before printing the traceback below take about 5 seconds?

Traceback (most recent call last):
File "<pyshell#3>", line 1, in <module>
File "E:\Python27\lib\site-packages\serial\serialwin32.py", line 236, in
raise SerialException("ReadFile failed (%s)" % ctypes.WinError())
SerialException: ReadFile failed ([Error 6] The handle is invalid.)


Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:

Reply via email to