os.stat() ?
Agent Drek
drek at smashpow.net
Sun Sep 9 17:17:24 EDT 2001
Am I wrong in thinking that this should return a value that chmod(1)
would expect?
$ touch myfile
$ ls -l myfile
-rw-r--r-- 1 drek pow 0 Sep 9 17:07 myfile
import os, stat
print os.stat('myfile')[stat.ST_MODE] & 0777
I get '420' from os.stat
python2.1.1 on FreeBSD
I'm looking for the best way to get a list of the full attributes of
a file.
thanks,
--
Derek Marshall
Smash and Pow Inc > 'digital plumber'
http://www.smashpow.net
More information about the Python-list
mailing list