Python and USB
rogerb at rogerbinns.com
Tue Apr 6 19:53:23 CEST 2004
> it was exactly the thing i'am was looking for.
> Now i only have to get my device running. Under
> C i was allready using the libusb, and so this code should
> be easily to be adapted.
Yes, you get a straight wrapping of libusb, as well as a
more Pythonic interface (in libusb.py and usb.py respectively).
There are some issues unresolved, mainly due to the APIs that
libusb exposes. For example it makes no mention of being
thread safe (my wrapper does release the GIL around read/writes)
and the lists of busses/devices/configs are freed and reallocated
if you call usb_find_busses/usb_find_devices. Consequently
the Python objects could be pointing at freed memory.
More information about the Python-list