Getting major/minor number of device file in Linux?

Grant Edwards grante at visi.com
Sat Jul 14 16:53:59 EDT 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
                               visi.com            FRANCE!



More information about the Python-list mailing list