How to get the minor and major device numbers with os.stat ?
Alain Tesio
alain at onesite.org
Sun Oct 20 22:55:12 EDT 2002
On Mon, 21 Oct 2002 02:46:13 +0000, Grant Edwards wrote:
> AFAIK, os.stat() has never returned device number info.
> Last time I looked, the posix stat wrapper doesn't do anyting
> with the st_rdev field. [Don't know why -- it sure would be
> useful sometimes.]
Thanks, if anyone if ever looking for a working example :
map(lambda h: eval("0x%s" % h),execute('stat -t -c "%%T %%t" %s' % fileName)[0].split())
Alain
More information about the Python-list
mailing list