title: When I flush the serial buffer in Python, it stops reading
body: <p>I have programmed an Arduino to send data serially to my computer. pySerial is reading correctly from the serial, but since I always want to have the most up-to-date information, I thought I could flush the input buffer using flushInput(), but when the command is executed, I can no longer read from the serial. I tried only flushing every 51 times (because 51 is a prime number and I can easily count 51 times with a counter without having to reset it) so that the Arduino would have enough time to send the next packet of data (running at 57600 baud), but still is not working. Namely, I have used a variable to store the length of the read line using deadline(), but, as soon as I hit 51 and the input buffer gets flushed, I always get a reading of 0, which means it's not reading anything. I've read through the documentation of pySerial, but haven't found any relevant information. Does flushInput() terminate the serial connection as well? Thanks a lot.</p>
  
  <p>EDIT: I am running Mac OS 10.7.5 and Python 2.7.3</p>
  
  <pre><code>try:
      self.s = serial.Serial("/dev/tty.usbmodemfa131", 57600, timeout = 0)
      self.FlightLoopCB = self.FlightLoopCallback
      XPLMRegisterFlightLoopCallback(self, self.FlightLoopCB, self.interval, 0)
  except serial.SerialException:
      self.s = None
      .
      .
      .
  
      self.length=0
      self.myline=self.s.readline()
      self.length=len(self.myline)
      print "Test: %i %i" % (self.length, self.j)
      if(self.length&gt;=7):
          if(self.myline[0:2]=="R,"):
              if(self.j%51==0):
                  self.s.flushInput()
  
              self.length=len(self.myline)
              self.myline=self.myline[2:6]
              self.myLineBytes=[0,0]
  
              self.myLineBytes[0]=unpack('&gt;H', self.myline[0:2])
              self.myLineBytes[1]=unpack('&gt;H', self.myline[2:4])
  </code></pre>