def flushInput(self): """Clear input buffer, discarding all that is in the buffer.""" if not self._isOpen: raise portNotOpenError termios.tcflush(self.fd, TERMIOS.TCIFLUSH)