title: How to access USB device data using pyusb?
body: <p>I am trying to stream data from a USB sensor-type device. I have tried the following code:</p>
  <pre><code>import usb.core
  device = usb.find(idVendor=0x1234, idProduct=0x4321)
  print(device.read(0x81, 7))
  </code></pre>
  <p>The output I get is:</p>
  <pre><code>array('B', [1, 96])
  </code></pre>
  <p>I'm really unsure how to use this and get meaningful sensor data. Could anyone point me in the right direction?</p>
  <p>For info, here's the output I get when I run <code>print(device)</code>:</p>
  <pre><code>DEVICE ID 1234:4321 on Bus 001 Address 013 =================
   bLength                :   0x12 (18 bytes)
   bDescriptorType        :    0x1 Device
   bcdUSB                 :  0x200 USB 2.0
   bDeviceClass           :    0x0 Specified at interface
   bDeviceSubClass        :    0x0
   bDeviceProtocol        :    0x0
   bMaxPacketSize0        :    0x8 (8 bytes)
   idVendor               : 0x0403
   idProduct              : 0xc2b0
   bcdDevice              : 0x1000 Device 16.0
   iManufacturer          :    0x1 XXXXXXXXXXXX
   iProduct               :    0x2 XXXX
   iSerialNumber          :    0x0 
   bNumConfigurations     :    0x1
    CONFIGURATION 1: 500 mA ==================================
     bLength              :    0x9 (9 bytes)
     bDescriptorType      :    0x2 Configuration
     wTotalLength         :   0x20 (32 bytes)
     bNumInterfaces       :    0x1
     bConfigurationValue  :    0x1
     iConfiguration       :    0x0 
     bmAttributes         :   0x80 Bus Powered
     bMaxPower            :   0xfa (500 mA)
      INTERFACE 0: Vendor Specific ===========================
       bLength            :    0x9 (9 bytes)
       bDescriptorType    :    0x4 Interface
       bInterfaceNumber   :    0x0
       bAlternateSetting  :    0x0
       bNumEndpoints      :    0x2
       bInterfaceClass    :   0xff Vendor Specific
       bInterfaceSubClass :   0xff
       bInterfaceProtocol :   0xff
       iInterface         :    0x2 XXXX
        ENDPOINT 0x81: Bulk IN ===============================
         bLength          :    0x7 (7 bytes)
         bDescriptorType  :    0x5 Endpoint
         bEndpointAddress :   0x81 IN
         bmAttributes     :    0x2 Bulk
         wMaxPacketSize   :   0x40 (64 bytes)
         bInterval        :    0x0
        ENDPOINT 0x2: Bulk OUT ===============================
         bLength          :    0x7 (7 bytes)
         bDescriptorType  :    0x5 Endpoint
         bEndpointAddress :    0x2 OUT
         bmAttributes     :    0x2 Bulk
         wMaxPacketSize   :   0x40 (64 bytes)
         bInterval        :    0x0
  </code></pre>