pySerial Windows write problem
bob at passcal.nmt.edu
Fri Jul 29 01:00:11 CEST 2005
"Peter Hansen" <peter at engcorp.com> wrote in message
news:rfCdnZHOGsnDwXTfRVn-gg at powergate.ca...
> Bob Greschke wrote:
> > But writing anything to the port
>> quickly (not always right away...like maybe 5-6 iterations through the
>> loop?) causes the
>> statement in the 'def close(self)' function of the serialwin32.py file of
>> the pySerial package to hang for a few seconds, then return.
> Are you certain it is this line that is blocking, and not the preceding
> line which is a call to SetCommTimeouts()? How did you prove which line
> it is? (I don't have an answer to the problem, just wanted to be sure of
> the information...)
I had the SetCommTimeouts line commented out. I just have a couple of
prints before and after the CloseHandle line.
I didn't write the C++ program, but it looks like it never closes the serial
port. It opens it when it starts up, then keeps it open until it quits.
Tsk tsk tsk. Sloppy. Maybe they did that to cover up this problem. :)
More information about the Python-list