Is there a simple cross platform HID module for python?

user2543822 picture user2543822 · Jul 16, 2013 · Viewed 12.2k times · Source

I'm trying to write some code that will fetch receive data from usb HID devices like scales. I've used pywinusb for windows but I need it to be cross platform. pyhid says it's just for Mac OS X. The only cross-platform module I've found so far is libhid which is written in C but still python accessible. However, I haven't found any helpful internet sources on how to use it in python.

All I need to do is read the weight from usb scales.

Are there any other cross-platform python HID modules>?

Answer

Shane Holloway picture Shane Holloway · Jul 17, 2013

Have you tried cython-hidapi? It is a cython wrapper around the excellent hidapi C library.

The PyPi page report that it works on POSIX, Mac OS X, and Windows operating systems.