pyudev 0.16 (Changelog, installation)
pyudev is a LGPL licensed, pure Python 2/3 binding to libudev, the device and hardware management and information library of Linux.
Almost the complete libudev functionality is exposed. You can:
Thanks to the power of libudev, usage of pyudev is very simple. 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
A user guide gives an introduction into common operations and concepts of pyudev, the API documentation provides a detailed reference:
Please ask questions about usage and development of pyudev to the mailing list at pyudev@librelist.com hosted by librelist.com. To subscribe to this list, send a mail to pyudev@librelist.com and reply to the confirmation email. To unsubscribe again, write to pyudev-unsubscribe@librelist.com and reply to the configuration mail. Past discussions are available in the list archives.
Please report issues and bugs to the issue tracker, but respect the following guidelines: