is there an API for python to work with pressure-s

2019-06-14 05:39发布

问题:

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?

回答1:

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.



回答2:

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