udev helpers¶
-
hwd.udev.devices_by_subsystem(subsys, only=<function <lambda>>)¶ Iterator that yields devices that belong to specified subsystem. Returned values are
pydev.Deviceinstances.The
onlyargument can be used to further filter devices. It should be a function that takes apyudev.Deviceobject, and returnsTrueorFalseto indicate whether device should be returned.Example:
>>> devices_by_subsystem('net') [Device('/sys/devices/pci0000:00/0000:00:1c.3/0000:02:00.0/net/wlp2s0'), Device('/sys/devices/virtual/net/lo')]