code: def flush(self):
          
          if self.debug:
              sys.stderr.write("%s: FLUSH INPUT (%i bytes waiting)\n" %(
                      self.__class__.__name__,
                      self.ser.inWaiting()
                      ))
          self.ser.flushInput()
docs: Flush input buffers.