Looking up device major and minor numbers in Python

Erno Kuusela erno-news at erno.iki.fi
Sun Jun 3 08:40:54 EDT 2001


In article <20010603.004420.1504569917.19294 at elroy.house>, "Harry
Henry Gebel" <hgebel at home.com> writes:

| Is there a way to find the device major and minor numbers of character
| and block special device files using python?

from looking at the sources, it looks like python does not
return the st_rdev member of the stat structure that would have
this information.

you could kludge around it by parsing ls output or something.

  -- erno



More information about the Python-list mailing list