lunaryorn/pyudev — Issue #39: Add `Device.from_node()`
Author: lunaryorn
Created: 2012-02-26 17:35:58+00:00
State: open
Labels: Device, documentation, enhancement, testsuite

Add a method to construct a Device object from a device node.

libudev doesn't provide means to do this directly, so we need to "os.stat()" the device file to determine its type (char or block device) and its major and minor device number. This information can then be passed to "Device.from_device_number()".