[Python-3000] Octal
"Martin v. Löwis"
martin at v.loewis.de
Wed Mar 14 21:27:15 CET 2007
> Can we wait until Unix file permissions are expressed in something
> other than octal?
The time machine at work:
machine:~/work/25 loewis$ ls -l x.py
-rw-r--r-- 1 loewis admin 22 Aug 25 2006 x.py
machine:~/work/25 loewis$ python
Python 2.3.5 (#1, Aug 19 2006, 21:31:42)
[GCC 4.0.1 (Apple Computer, Inc. build 5363)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> from stat import *
>>> os.chmod("x.py", S_IRUSR|S_IRGRP|S_IWUSR|S_IWGRP)
>>>
machine:~/work/25 loewis$ ls -l x.py
-rw-rw---- 1 loewis admin 22 Aug 25 2006 x.py
Not as brief as 0660, but more readable.
Regards,
Martin
More information about the Python-3000
mailing list