[Python-bugs-list] [ python-Bugs-592859 ] os.chmod is underdocumented :-)

noreply@sourceforge.net noreply@sourceforge.net
Thu, 08 Aug 2002 15:46:25 -0700


Bugs item #592859, was opened at 2002-08-08 15:46
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=592859&group_id=5470

Category: Documentation
Group: Python 2.2.1
Status: Open
Resolution: None
Priority: 5
Submitted By: Bjorn Pettersen (bpettersen)
Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: os.chmod is underdocumented :-)

Initial Comment:
Currently it says: "Change the mode of path to the 
numeric mode." I spent some time trying to figure out 
what mode should be on Windows before I looked in 
MSDN and did a grep over the Python Lib.

Could we add: "Constants defined for the numeric mode 
parameter are defined in the stat module. E.g. to make 
a file writable:

  os.chmod(filename, S_IWUSR|S_IWGRP|S_IWOTH)

or simply

  os.chmod(filename, S_IWRITE)

on Windows.
"

It would probably be a good idea to list the names for 
the permission bits in the stat docs also...

-- bjorn


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=592859&group_id=5470