def send(self, data=b'\n'):
        """
        Writes data bytes to serial device port.
        Returns number of bytes sent
        """
        try:
            count = os.write(self.fd, data)
        except __HOLE__ as ex1:  # ex1 is the target instance of the exception
            if ex1.errno == errno.EAGAIN: #BSD 35, Linux 11
                count = 0  # buffer full can't write
            else:
                raise #re raise exception ex1

        return count
dataset/ETHPy150Open ioflo/ioflo/ioflo/aio/serial/serialing.py/DeviceNb.send