Skip to main content
Help us improve Python packaging – donate today!

Python interface to /proc/devices

Project Description

This package supplies a Python interface to the /proc/devices file.

To use, instantiate the ProcDev class and invoke its methods.

>>> from pyprocdev import *
>>> procdev = ProcDev()
>>> procdev.majors(DeviceTypes.BLOCK)
[8, 9, 11, 65, 66, 67, 68, 69, 70, 71, 128, 129, 130, 131, 132, 133, 134, 135, 253, 254, 259]
>>> procdev.majors(DeviceTypes.CHARACTER)
[1, 4, 5, 7, 10, 13, 14, 21, 29, 99, 116, 128, 136, 162, 166, 180, 188, 189, 202, 203, 226, 244, 245, 246, 247, 248, 249, 250, 251, 252, 253, 254]
>>> procdev.drivers(DeviceTypes.BLOCK)
frozenset(['md', 'sr', 'device-mapper', 'blkext', 'mdp', 'sd'])
>>> procdev.get_driver(DeviceTypes.BLOCK, 8)
'sd'
>>> procdev.get_majors(DeviceTypes.BLOCK, 'sd')
[8, 65, 66, 67, 68, 69, 70, 71, 128, 129, 130, 131, 132, 133, 134, 135]

Release history Release notifications

This version
History Node

0.2

History Node

0.1

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
pyprocdev-0.2.tar.gz (24.2 kB) Copy SHA256 hash SHA256 Source None Jun 7, 2016

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging CloudAMQP CloudAMQP RabbitMQ AWS AWS Cloud computing Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page