def flush(self): """\ Flush of file like objects. In this case, wait until all data is written. """ if not self.is_open: raise portNotOpenError termios.tcdrain(self.fd)