问题描述
我想编写一个跨平台的wxPython应用程序,我想知道是否有一个API可以在不同平台上使用笔式平板电脑?我只想获取压力值和ereaser标志-但是我无法对python跨平台罚款.
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.到目前为止,我仅找到特定于Windows的解决方案,Mac OS和Linux有哪些选项?
UPD. so far, I found only windows-specific solution, what are the options for Mac OS and Linux?
推荐答案
https://bitbucket.org/AnomalousUnderdog/pythonmactabletlib
该库以纯C代码形式存在,并以动态方式编译 库/共享库.它与Mac OS X的API交互以获取 数位板输入中的数据.
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.
然后,Python脚本可以使用ctypes获取数据.
Then, Python scripts can use ctypes to get the data.
如果您有任何问题,请给我发消息.
Send me a message if you have any problems with it.
这篇关于是否有适用于python的API与压敏笔板配合使用? (Mac OS,Linux)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!