title: PyUSB library using too much CPU time
body: <p>I have a piece of code that continuously monitors a USB HID device for input.The device is a infrared receiver for a remote control.</p>
  
  <p>I am trying to program using <strong>PyUSB</strong> which is a python wrapper for <strong>libusb</strong> to monitor the remote key press.</p>
  
  <p>To constantly monitor the device for inputs, I added the following lines of code </p>
  
  <pre><code>while 1:
      try:
          data = dev.read(ep.bEndpointAddress, ep.wMaxPacketSize*2)
          data=data.tolist()           
          key=join_int(data)                              #Join the elements of list
          print "Key is " , key
      except usb.core.USBError as e:
          pass
  </code></pre>
  
  <p>The code uses a lot of CPU time on checking using <strong>top</strong>.</p>
  
  <p>Is there a way to reduce the CPU usage.Adding sleep() is one way but that might miss keystrokes if I am not wrong.</p>