using a USB HID device

"Martin v. Löwis" martin at v.loewis.de
Sun Apr 18 13:56:56 EDT 2004


Wouter van Ooijen (www.voti.nl) wrote:
> I want to use Python to interface with an USB HID device (not a
> keyboard or mouse, just something that uses the HID driver to avoid
> the need for a specific driver). Is this possible in pure Python on
> Windows, or even better, in a portable way?

What is the Win32 API for such devices? If it is plain
CreateFile/ReadFile/WriteFile/DeviceIoControl, you should be
able to do it in pure Python, using the PythonWin extensions.

Likewise, on Unix, you can use device nodes, and the fcntl module.

I don't think there is a platform-independent Python module for
such devices, yet, but you could write your own abstraction layer
using those building blocks.

HTH,
Martin




More information about the Python-list mailing list