Re: pySerial Windows write problem



Bob Greschke wrote:
> But writing anything to the port
quickly (not always right away...like maybe 5-6 iterations through the loop?) causes the

    win32file.CloseHandle(self.hComPort)

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...)


-Peter
.



Relevant Pages

  • Re: Just wondering
    ... If the task is to test the overhead, then the two loops need to be equivalent. ... compare map() time to for time, ... def doit: ... Doing the loop tells what it takes to loop. ...
    (comp.lang.python)
  • Re: Start and stop a ruby loop ;(
    ... def bar ... Because the object's instance variables of @baz and @quux haven't been ... it looks like you want to use a while loop instead of a for ... class MyFirstClass ...
    (comp.lang.ruby)
  • Re: Another TCPSocket Question
    ... require 'socket' ... puts "Entering loop" ... def initialize(tcp_sock) ... not shown here is required to deal with binary networking streams ...
    (comp.lang.ruby)
  • Re: Style question - defining immutable class data members
    ... def inc: ... This is about a small optimization in defining ... Each one creates its own count, and a list variables, and manipulates them calls to inc and val. ... The values manipulated by one instance of C2 in one pass through the loop are not affected when, on the next pass through the loop, that instance is destroyed and another instance is created. ...
    (comp.lang.python)
  • Re: Style question - defining immutable class data members
    ... The only difference between Case1 and Case2 classes is where the count ... on is discarded as you go through the next pass on the outer loop. ... def inc: ...
    (comp.lang.python)