Python os.makedev() Method
Example
Print the raw device number:
#Import os Library
import os
# Print the raw device number
print (os.makedev(10,12))
Try it Yourself »
Definition and Usage
The os.makedev()
method returns the raw device number from the
specified major and minor device numbers.
Raw devices are character devices. The driver of these devices communicates by sending and receiving characters like bytes, octets.
Major device number determines the driver of a device.
Minor device number is used by the driver to differentiate between various physical and logical devices it controls.
Note: Available on UNIX platforms only.
Syntax
os.makedev(major, minor)
Parameter Values
Parameter | Description |
---|---|
major | Required. An integer value representing the device major number |
minor | Required. An integer value representing the device minor number |
Technical Details
Return Value: | A int value, representing a raw device number |
---|---|
Python Version: | 2.3 |