'Clear input buffer, discarding all that is in the buffer.'

def reset_input_buffer(self):

    if (not self.is_open):
        raise portNotOpenError
    win32.PurgeComm(self._port_handle, (win32.PURGE_RXCLEAR | win32.PURGE_RXABORT))
