简化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如何在数据库中插入行时自动发送电子邮件?   从进程输出读取的Java问题   java质疑StyledDocument和JTextPane之间的关系,以及接口的正确使用   java错误getPlayer(args[0]);   java如何使Spring引导在重新打包的WAR中包含清单文件?   Java中的除法与模   java使用2d数组和JfreeChart制作散点图   java扩展SonarQube FindBugs插件和自定义FindBugs插件   javaspring:hibernate+ehcache   具有不正确的equals和HashCode实现的java HashMap   java Jaspersoft报告网。旧金山。jasperreports。发动机例外:net。旧金山。jasperreports。发动机填满JRepressionEvalException:计算表达式时出错   java如果输入与其变量不匹配,如何添加错误   在java中使用简单数组[]实现队列   无法启动上下文路径/hsx上的java FAIL应用程序