pyudev is a Python binding for libudev functionality. You can enumerate devices, query device properties and attributes or monitor devices, including asynchronous monitoring with threads, or within the event loops of Qt, Glib or wxPython.
The binding supports PyPy. It is tested against udev 151 or newer, earlier versions of udev as found on dated Linux systems may work, but are not officially supported.
Usage of pyudev is quite simply thanks to the power of the underlying udev library. Getting the labels of all partitions just takes a few lines:
>>> import pyudev
>>> context = pyudev.Context()
>>> for device in context.list_devices(subsystem='block', DEVTYPE='partition'):
... print(device.get('ID_FS_LABEL', 'unlabeled partition'))
...
boot
swap
system
The user guide and a complete Support
Please report issues and questions to the issue tracker, but respect the following guidelines:
master branch.udevadm --version) in
the description of your issue.The source code is hosted on how to properly contribute to open source projects on GitHub.
I will be doing regular releases of this project every August and October, shortly after Fedora releases are branched from rawhide.
If you believe an extra release would help you in some way, please file an issue, explaining why you need the new release, and I expect I'll put one up.
Why should you explain why you need the new release? Well, it is helpful to me, because pyudev is not at all part of my regular work, and I tend not to know very much about how it is used these days.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。