def output_waiting(self):
        """Query the number of bytes waiting to be written to the serial port.

        Returns:
            int: number of bytes waiting to be written.

        Raises:
            SerialError: if an I/O or OS error occurs.

        """
        # Get input waiting
        buf = array.array('I', [0])
        try:
            fcntl.ioctl(self._fd, termios.TIOCOUTQ, buf, True)
        except OSError as e:
            raise SerialError(e.errno, "Querying output waiting: " + e.strerror)

        return buf[0]
def output_waiting ( self ) : buf = array . array ( 'I' , [ 0 ] ) try : fcntl . ioctl ( self . _fd , termios . TIOCOUTQ , buf , True ) except OSError as e : raise SerialError ( e . errno , "Querying output waiting: " + e . strerror ) return buf [ 0 ]
Query the number of bytes waiting to be written to the serial port.

        Returns:
            int: number of bytes waiting to be written.

        Raises:
            SerialError: if an I/O or OS error occurs.