Python termios.tcdrain() Examples
The following are 9
code examples of termios.tcdrain().
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example.
You may also want to check out all available functions/classes of the module
termios
, or try the search function
.
Example #1
Source File: serial.py From python-periphery with MIT License | 5 votes |
def flush(self): """Flush the write buffer of the serial port, blocking until all bytes are written. Raises: SerialError: if an I/O or OS error occurs. """ try: termios.tcdrain(self._fd) except termios.error as e: raise SerialError(e.errno, "Flushing serial port: " + e.strerror)
Example #2
Source File: serialposix.py From ddt4all with GNU General Public License v3.0 | 5 votes |
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)
Example #3
Source File: serialposix.py From Jandroid with BSD 3-Clause "New" or "Revised" License | 5 votes |
def drainOutput(self): """internal - not portable!""" if not self._isOpen: raise portNotOpenError termios.tcdrain(self.fd)
Example #4
Source File: serialposix.py From Jandroid with BSD 3-Clause "New" or "Revised" License | 5 votes |
def drainOutput(self): """internal - not portable!""" if not self._isOpen: raise portNotOpenError termios.tcdrain(self.fd)
Example #5
Source File: serialposix.py From Jandroid with BSD 3-Clause "New" or "Revised" License | 5 votes |
def drainOutput(self): """internal - not portable!""" if not self._isOpen: raise portNotOpenError termios.tcdrain(self.fd)
Example #6
Source File: serialposix.py From AstroBox with GNU Affero General Public License v3.0 | 5 votes |
def drainOutput(self): """internal - not portable!""" if not self._isOpen: raise portNotOpenError termios.tcdrain(self.fd)
Example #7
Source File: serialposix.py From android3dblendermouse with Apache License 2.0 | 5 votes |
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)
Example #8
Source File: pikspect.py From pikaur with GNU General Public License v3.0 | 5 votes |
def _restore(cls, what: Optional[TcAttrsType] = None) -> None: if sys.stdout.isatty(): # termios.tcdrain(sys.stdout.fileno()) # if sys.stderr.isatty(): # termios.tcdrain(sys.stderr.fileno()) # if sys.stdin.isatty(): # termios.tcflush(sys.stdin.fileno(), termios.TCIOFLUSH) if what: termios.tcsetattr(sys.stdin.fileno(), termios.TCSANOW, what)
Example #9
Source File: serialposix.py From android_universal with MIT License | 5 votes |
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)