stat module
Gian Mario Tagliaretti
liquid at kuht.it
Thu May 20 16:47:51 EDT 2004
Hi guys, maybe is an easy question but there is something I haven't understood
I will post the example for better explain
Python 2.3.4c1 (#2, May 13 2004, 21:46:36)
[GCC 3.3.3 (Debian 20040429)]
>>> import os
>>> mode_list = os.lstat('/etc/passwd')
>>> import stat
>>> mode = stat.S_IMODE(mode_list[0])
>>> print mode
420
now if I chech the permission on /etc/passwd I get
liquid at debian:~$ ls -la /etc/passwd
-rw-r--r-- 1 root root 1077 Apr 28 17:48 /etc/passwd
liquid at debian:~$
which is a 644 file permission.
I've tried to read very carefully the manual and the module description but
there is something that probably I don't understand
Thank's for any help
Mario aka Liquid
More information about the Python-list
mailing list