Digital Me

Random contributions to digital noise

Using PyUSB with NetBeans

Wednesday November 03, 2010 @ 05:49 AM (PDT)

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

New comment

required, won't be displayed

optional

Don't type anything here unless you're an evil robot:


And especially don't type anything here:

Basic XHTML (including links) is allowed, just don't try anything fishy. Your comment will be auto-formatted unless you use your own <p> tags for formatting. You're also welcome to use Textile.

Copyright © 2012 Mihailo Lalevic. All rights reserved.
Powered by Thoth.