Getting major/minor number of device file in Linux?

Grant Edwards grante at
Sat Jul 14 22:53:59 CEST 2001

I can't figure out how to get the major and minor numbers of a
char special file under Linux.  What I want is the st_rdev
field of the stat struct, but os.stat doesn't seem to return
that field.

Grant Edwards                   grante             Yow!  I feel real
                                  at               SOPHISTICATED being in

More information about the Python-list mailing list