PyUSB provides USB access on the Python language.
Rate This ProjectLogin To Rate This Project
Wonderful library, makes quick interfacing with wild or unknown devices a snap. Write a driver for almost anything once you know the protocol.
@John Nagle: For better Windows Support use libusb-win32 which you find at sourceforge. It's OpenSource und avaible fo Win7, too.
Documentation isnt great, here is a fool proof steps to getting this working from a clean machine. 1 - Download Ubuntu 12.04 2 - Install 3 - Reboot into Ubuntu 4 - CRTL+ALT+T [ to bring up terminal ] $ sudo apt-get update ... [ output discarded ] ... $ sudo apt-get install python-pip Reading package lists... Done ... [ output truncated ] ... Setting up python-pip (1.0-1build1) ... $ sudo pip install pyusb Downloading/unpacking pyusb ... [ output truncated ] ... Cleaning up... $ python Python 2.7.3 (default, Aug 1 2012, 05:14:39) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import usb.core >>> usb.core.find() <usb.core.Device object at 0x7f0e698de510> Now you can have some fun
The documentation is misleading. It implies that this provides actual access to USB functionality from Python. It doesn't. It's just a Python front end to a platform-specific "back end" which may be available from another source. There's an old Windows back-end at "http://www.craftedge.com/products/libusb.html", but it was written for Windows XP, and can supposedly be run in "compatibility mode" on Windows Vista. Current versions of Windows, who knows? It's not open source, and it comes from someone who sells paper-cutting machines for crafters. Not too helpful.