I’m going to rewrite my previous example on programming USB with Python on Linux. libhid I’m using at the moment is using old version of libusb and that version seems not to be behaving best in multi-threading environment. The new version of libusb has completely different API, so I decided to use PyUSB a Python library wrapped around libusb.
“This should be straightforward” I thought to myself, however I had trouble making it work with NetBeans I installed PyUSB according to instructions and it seemed installation was successful, but no joy in NetBeans. Even import usb.core was throwing error ImportError: No module named core That was strange since at least import usb.core worked fine in IDLE.
Anyway, to cut the long story short, PyUSB was installed in /usr/local/lib/python2.6/dist-packages, when adding it to path, and other experiments did not yield expected results, I just copied files to /usr/lib/python2.6/dist-packages where I have other libraries installed and I know them working. After doing that everything was fine, I could actually do some coding. Why it did not work in the first place? I don’t have a clue, however I won’t be investigating it any further.
Comments