def read(self, size=1):
        if not self.is_open:
            raise portNotOpenError
        read = bytearray()
        while len(read) < size:
            buf = os.read(self.fd, size - len(read))
            if not buf:
                break
            read.extend(buf)
        return bytes(read)
Read size bytes from the serial port. If a timeout is set it may
dataset/ETHPy150Open pyserial/pyserial/serial/serialposix.py/VTIMESerial.read