Skip to main content

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]

Download files

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

Source Distribution

pyprocdev-0.2.tar.gz (24.2 kB view details)

Uploaded Source

File details

Details for the file pyprocdev-0.2.tar.gz.

File metadata

  • Download URL: pyprocdev-0.2.tar.gz
  • Upload date:
  • Size: 24.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pyprocdev-0.2.tar.gz
Algorithm Hash digest
SHA256 e42e75c2a9264f6354526115e36d3631649d365928dd6da280fc0fc994daa06d
MD5 6766e367d74d93c8328cf73e7c0fec7f
BLAKE2b-256 d138a1404c1321bdd7881cd16e26b9137075625f3e2f6db306a0cfb097daabce

See more details on using hashes here.

Release history Release notifications | RSS feed

This release

0.2 This release

1 file

0.1

1 file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page