I'm new to Python and I'm trying to read some values from an USB device via PyUSB. Well, it works now but I ran into some trouble: While reading data from the device, PyUSB needs an endpoint to read the data from. This endpoint is identified via a hex value. If I read the data like...
dev.read('\x81', ...)
... I get an error "AttributeError: 'NoneType' object has no attribute 'bmAttributes'". If I read the data like...
dev.read(0x81, ...)
... it works.
So my simple question is: What's the difference between 0x81 and '\x81'?
:-)