简化Windows上USB/HID通信的软件包

pywinusb的Python项目详细描述


Introduction

该项目旨在成为一个简单的usb/hid用户应用程序空间(因此没有系统 需要驱动程序)100%python包(没有c扩展)。最初的目标 简单的hid设备管理。

这个项目的设想是类似于pyserialpyparallel 但对于USB/HID硬件爱好者来说。

Advantages

  • All python code, using ctypes
  • Top level handling of HID events (usage events calling hook function handlers)

Current limitations

根据您的应用程序,您可能会发现这些限制

  • Windows only (so far…)
  • Maybe speed. I’ve had feedback by some users that speed is not a problem for high data throughput, but I think you might hit some Python limits if you are require any real time processing.

Installation Instructions

Windows

最方便的安装方法是使用easy_installpip,i 建议在熟悉库之后执行此操作,因为可能会丢失 跟踪示例源文件,但您可以查看示例或 浏览github存储库的源代码。

如果使用来自pypi的源包(.zip),请解压缩文件,或获取源 从主存储库运行熟悉的setup.py install命令行 足够了,需要setuptools或distribute(对于python 3)。

Other

到目前为止,只支持windows操作系统。

Using pywinusb.hid

查看/examples目录,查看一些(好的,现在很少)脚本。这些 例如,演示如何使用pywinusb.hid处理hid类中的事件 设备使用事件。

最新的代码和一些wiki信息可以在main project code page上找到。

Utilities

稍后将详细介绍…

  • The module pywinusb.hid.tools contains a function to check HID class devices capabilities, for now it provides a basic human readable text report (see the hid.core package, run it as main while HID class devices are connected to your system)

Feedback and Contributing

随时联系我!使用main code project page,告诉你怎么做 你考虑一下这个项目或者给我带些你认为很酷的东西 考虑一下。

任何参与它的赞赏,请随意贡献更多的例子或应用程序,或只是一个参考您的开源项目,使用该库。

Release changes

[下一版本]

  • Fixed issue #33. Allow to read totally unparsed reports.

0.4.2

  • 第33期。
  • 公关39。关闭时间歇性锁定。

0.4.1

  • python 3.5.164位上的修补cTypes问题。

0.4.0

0.3.7

  • Added PySide PnP example.

0.3.6

  • Working on python3.3 (broken on 0.3.5)

0.3.5

  • Win7/64 PnP example fixed again (due ctypes and Windows 64 API changes).

0.3.4

  • Jeff Rowberg (bluegiga) patch for deamon threads.

0.3.3

  • Win7/64 fixes, PnP example fixed, show_hids.py now using local encodings, stdout encodings now not in library (should be part of applications), usage_pages.py UsagePage repr() fix.

0.3.2

  • Python 3 filtering fix

0.3.1

  • Python 2 and 3 support (tested with Python 3.2)

0.3.0

  • Refactored setup api handling.
  • Many PyLint fixes.

0.2.9

  • Fixed broken value array usages transactions
  • Better Setup API device paths handling

<= 0.2.8

  • Fixed broken value array usages transactions
  • Fixing sending output / feature reports
  • Fixed broken input report handling
  • Stability improvements
  • Tweaked PnP example, added frame closing event handler, so the USB device is closed
  • Report reading threads and device closing optimizations
  • Fixed bugs preventing properly setting report usage variables after a HidReport().get()
  • Fixed raw_data.py example
  • Fixed bug preventing proper value array setting/getting items
  • Fixed deadlock when device unplugged
  • Added HidDevice.set_raw_data_handler(), and corresponding raw_data.py example script
  • Fixing output only mode (no input report for forced open)
  • Bringing a little bit of stability
  • Output only mode (no reading thread configured)
  • Kind of usable now

0.1.0

  • First public release

nn

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java将一个节点拖到另一个不运行JavaFX的节点中   java如何在spring boot中创建完全自定义的查询   java Arraylist和ArrayListBlockingQueue之间的区别是什么?   java Weblogic会中断长时间运行的线程吗   java如何调用displayAd()方法?   使用数组在两个组之间进行java IPL匹配   java如何在Eclipse中的org下创建测试套件。朱尼特   java获取屏幕上任意点的鼠标坐标   正则表达式需要java正则表达式方面的帮助   如何使用Java获取Ram大小和硬盘大小?   java如何将所需长度设置为数组中的整数?   安卓应用程序启动前的java程序已终止   swing设置要在Java代码中打印的页边距   迭代期间java故障安全迭代器的删除   java如何在main中调用方法,以便它们在同一行上输出?   编译Java:尝试播放mp3文件时出错   java如何使用Spring数据Rest在POST调用中保存嵌入对象   java JAXWS如何在端点外部注入SecurityContext