Python os module lacks the chflags/lchflags methods
| Affects | Status | Importance | Assigned to | Milestone | |
|---|---|---|---|---|---|
| python2.7 (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Bug Description
Reading http://
However, on up-to-date Precise (Python 2.7.3rc2) and Oneiric (Python Python 2.7.2+), the following commands :
import os
os.chflags
report "AttributeError" in a Python shell. Grepping in /usr/lib/python2.7, the only reference to "chflags" is in the `shutil.py` file which just checks if the python method is present or not.
As the system interface is OK (I can successfully use "chattr" and "lsattr" in the shell on both Ubuntu versions, and historically this features has been present since I started using Linux), I think the "flags" part of the Python distribution should be activated on Ubuntu.
Currently I need this feature in my Python application to see if some files have the IMMUTABLE or APPEND flag, but generally speaking I can't see any good reason why this feature is not active while beeing part of the standard Python distribution.
regards,
--
Olivier

this is only available on MacOS and FreeBSD. Please use chattr on Linux instead.