title: Issues with python hex()
body: <p>I have json file as follows</p>
  
  <pre><code>{
     "devices"  :[
                   {
                   "Manufacturer name": "Sony",
                   "vendor_id":"8087" ,
                   "product_id" : "07da"
                   },
                   {
                   "Manufacturer name": "Sandisk",
                   "vendor_id": "1d6b",
                   "product_id" : "0002"
                   },
                   {
                   "Manufacturer name": "Chicony Electronics",
                   "vendor_id": "04f2",
                   "product_id" : "b381"
                   }
                 ]
  
  }
  </code></pre>
  
  <p>This json file contains the vendor and product id of the usb devices connected to my laptop. I am checking whether usb device is connected to laptop or not using this json file. The vendor and product id are in <code>hex</code>. Since <code>json</code> is cannot use <code>hex</code>, I have written these value in string format. I am actually using python's <code>pyusb</code> module for checking the connectivity of the devices as follow</p>
  
  <pre><code>import usb.core
  def get_hex(hex_str):
      hex_int = int(hex_str, 16)
      return hex(hex_int)
  
  vendor_id = get_hex("8087")
  product_id = get_hex("07da")
  dev = usb.core.find(idVendor=vendor_id, idProduct=product_id)
  
  if dev is None:
      print "Disconnected"
  else:
      print "Connected"
  </code></pre>
  
  <p>But when I am running this code I am getting print message as <code>"Disconnected"</code>
  Here actually problem is that <code>usb.core.find()</code> function needs value in <code>int</code> but value <code>get_hex()</code> function returns is <code>string</code>. Once change line <code>dev = usb.core.find(idVendor=vendor_id, idProduct=product_id)</code> in above code to <code>dev = usb.core.find(idVendor=0x8087, idProduct=0x07da)</code>. The above code works properly. Please let me know how to return value from <code>get_hex()</code> in <code>int</code>.</p>