def bulkRead(self, endpoint, length, timeout=0):
        """
        Synchronous bulk read.
        timeout: in milliseconds, how long to wait for data. Set to 0 to
          disable.
        See bulkWrite for other parameters description.

        To avoid memory copies, use an object implementing the writeable buffer
        interface (ex: bytearray) for the "data" parameter.

        Returns received data.

        May raise an exception from the USBError family. USBErrorTimeout
        exception has a "received" property giving the bytes received up to the
        timeout.
        """
        # pylint: disable=undefined-variable
        endpoint = (endpoint & ~ENDPOINT_DIR_MASK) | ENDPOINT_IN
        # pylint: enable=undefined-variable
        data, data_buffer = create_binary_buffer(length)
        try:
            transferred = self._bulkTransfer(endpoint, data, length, timeout)
        except USBErrorTimeout as exception:
            exception.received = data_buffer[:exception.transferred]
            raise
        return data_buffer[:transferred]
def bulkRead ( self , endpoint , length , timeout = 0 ) : endpoint = ( endpoint & ~ ENDPOINT_DIR_MASK ) | ENDPOINT_IN data , data_buffer = create_binary_buffer ( length ) try : transferred = self . _bulkTransfer ( endpoint , data , length , timeout ) except USBErrorTimeout as exception : exception . received = data_buffer [ : exception . transferred ] raise return data_buffer [ : transferred ]
Synchronous bulk read.
        timeout: in milliseconds, how long to wait for data. Set to 0 to
          disable.
        See bulkWrite for other parameters description.

        To avoid memory copies, use an object implementing the writeable buffer
        interface (ex: bytearray) for the "data" parameter.

        Returns received data.

        May raise an exception from the USBError family. USBErrorTimeout
        exception has a "received" property giving the bytes received up to the
        timeout.