def read_data(self, size):
        """Receive data from the device.

        If the read fails for any reason, an :obj:`IOError` exception
        is raised.

        :param size: the number of bytes to read.

        :type size: int

        :return: the data received.

        :rtype: list(int)

        """
        result = self.dev.read(0x81, size, timeout=1200)
        if not result or len(result) < size:
            raise IOError('pywws.device_pyusb1.USBDevice.read_data failed')
        return list(result)
def read_data ( self , size ) : result = self . dev . read ( 0x81 , size , timeout = 1200 ) if not result or len ( result ) < size : raise IOError ( 'pywws.device_pyusb1.USBDevice.read_data failed' ) return list ( result )
Receive data from the device.

        If the read fails for any reason, an :obj:`IOError` exception
        is raised.

        :param size: the number of bytes to read.

        :type size: int

        :return: the data received.

        :rtype: list(int)