[Tutor] Pyserial and invalid handle

John Smith jocjo.s at verizon.net
Tue Nov 30 00:25:04 CET 2010


On 11/29/2010 4:20 PM, Emile van Sebille wrote:
> 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,
>> dsrdtr=False)
>> >>> ser.read()
>
> ... does the delay before printing the traceback below take about 5
> seconds?
>


No. There is no delay regardless of the timeout setting.

John


More information about the Tutor mailing list