[docs] function os.lchmod() does not seem to exist

Sandro Tosi sandro.tosi at gmail.com
Thu Feb 17 20:05:24 CET 2011

Hi Wout,
thanks for your email.

On Sun, Feb 6, 2011 at 05:16, Wout van Albada <wout at bliepbliep.net> wrote:
> Hi,
> I tried to use the os.lchmod() function documented here:
> http://docs.python.org/library/os.html#os.lchmod
> However, it doesn't exist in my version of Python:
> wout at zoot ~ 549>python
> Python 2.6.6 (r266:84292, Dec 26 2010, 22:31:48)
> [GCC 4.4.5] on linux2
> Type "help", "copyright", "credits" or "license" for more information.
>>>> import os
>>>> os.lchmod('blabla', 0)
> Traceback (most recent call last):
>   File "<stdin>", line 1, in <module>
> AttributeError: 'module' object has no attribute 'lchmod'

this happens because POSIX doesn't require lchmod (and lchfalgs) and
so Linux systems doesn't provide them. I just opened an issue[1] to
discuss about how to handle documentation for these cases.

[1] http://bugs.python.org/issue11233

Sandro Tosi (aka morph, morpheus, matrixhasu)
My website: http://matrixhasu.altervista.org/
Me at Debian: http://wiki.debian.org/SandroTosi

More information about the docs mailing list