By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
439,941 Members | 1,753 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 439,941 IT Pros & Developers. It's quick & easy.

stat module

P: n/a
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@debian:~$ ls -la /etc/passwd
-rw-r--r-- 1 root root 1077 Apr 28 17:48 /etc/passwd
liquid@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

Jul 18 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Gian Mario Tagliaretti <li****@kuht.it> writes:
I've tried to read very carefully the manual and the module
description but there is something that probably I don't understand


644 is base8. 420 is base10.
Marius
--
"Who needs crypto WYCWLT?"
-- William Newman
Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.