R. David Murray <rdmur...@bitdance.com> added the comment:

I'm curious, are the perl and sh functions you say do the right thing wrappers 
around 'access', or are they some other sort of function?  The Python code is 
just a thin wrapper around the system function, and as such will follow the 
system function's semantics.

I do agree that the FreeBSD interpretation of the semantics of access 
is...unexpected, as well as unfortunate :)  So, a doc note about the superuser 
X_OK quirk is appropriate.  Care to propose a doc patch?  Personally I wouldn't 
include the stat example, but rather simply refer to stat as the portable way 
to check if the execute bit is set (and then you still have to call os.access 
to see if the real uid has permission to execute).

On the other hand, proposing a portable version of 'access' for inclusion in 
shutils might be appropriate, if you want to open a new issue for that 
(preferably with a patch including docs and unit tests :)

----------
assignee:  -> d...@python
components: +Documentation -Library (Lib)
nosy: +d...@python, r.david.murray
stage:  -> needs patch
versions: +Python 2.7, Python 3.1, Python 3.2

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue9311>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to