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

SourceForge.net noreply@sourceforge.net
Mon, 06 Jan 2003 05:33:29 -0800


Bugs item #592859, was opened at 2002-08-08 17: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: Closed
>Resolution: Fixed
Priority: 5
Submitted By: Bjorn Pettersen (bpettersen)
Assigned to: Raymond Hettinger (rhettinger)
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


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

>Comment By: Raymond Hettinger (rhettinger)
Date: 2003-01-06 08:33

Message:
Logged In: YES 
user_id=80475

Fixed.
See Doc/lib/libos.tex 1.108


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

Comment By: Raymond Hettinger (rhettinger)
Date: 2002-08-08 20:44

Message:
Logged In: YES 
user_id=80475

I agree that the current docs are as clear as mud.
Will draft a clarification.

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

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