pyprocdev._pyprocdev module

Pyprocdev main class.

class pyprocdev._pyprocdev.ProcDev(filepath='/proc/devices')

Bases: object

Main class for /proc/devices data.

drivers(device_type)

The drivers for device_type.

Parameters:device_type (DeviceType) – the device type
Returns:the names of drivers for this device type
Return type:set of str
Raises ProcDevValueError:
 on bad device_type
get_driver(device_type, major_number)

Get the driver name for major_number.

Parameters:
  • device_type (DeviceType) – the device type
  • major_number (int) – the major number
Returns:

the drive name for this major number or None if none

Return type:

str

Raises ProcDevValueError:
 

for bad device type or major number

get_majors(device_type, driver)

Get the major numbers for driver.

Parameters:
  • device_type (DeviceType) – the device type
  • driver (str) – the name of the driver
Returns:

the set of major numbers corresponding to this driver

Return type:

sorted list of int

Raises ProcDevValueError:
 

for a bad device type or driver

majors(device_type)

The major numbers for device_type.

Parameters:device_type (DeviceType) – the device type
Returns:a sorted list of major numbers
Return type:list of int
Raises ProcDevValueError:
 on bad device_type

Previous topic

pyprocdev._errors module

Next topic

pyprocdev._version module

This Page