is there an API for python to work with pressure-sensitive pen-tablets? (Mac OS, Linux)

2k Views Asked by At

I want to write a cross-platform wxPython app, and I'm wondering if there a single API to work with pen-tablets on different platforms? I'm only interested to get pressure value and ereaser flag - but I couldn't fined anything cross-platform for python.

UPD. so far, I found only windows-specific solution, what are the options for Mac OS and Linux?

2

There are 2 best solutions below

0
On

If your target tablets are HIDs, which they probably are, you can use python-hid.

0
On

https://bitbucket.org/AnomalousUnderdog/pythonmactabletlib

A small Python library to allow Python scripts to access pen tablet input data in Mac OS X.

The library exists as plain C code compiled as a dynamic library/shared object. It interfaces with the Mac OS X's API to get data on pen tablet input.

Then, Python scripts can use ctypes to get the data.

Send me a message if you have any problems with it.