missing os.lchmod, os.lchflags

Ned Batchelder ned at nedbatchelder.com
Wed Dec 24 16:28:06 EST 2014


On 12/24/14 2:42 PM, Ethan Furman wrote:
> According to the docs [1] these functions should be available as of 2.6,
> yet they are missing on a 2.7, 3.2, and 3.4 install (ubuntu 12.10 and
> 14.04)
>
> Any ideas why?

In the Python source, I see this 
(https://hg.python.org/cpython/file/c5603b77df68/pyconfig.h.in#l477):

     /* Define to 1 if you have the 'lchflags' function. */
     #undef HAVE_LCHFLAGS

     /* Define to 1 if you have the `lchmod' function. */
     #undef HAVE_LCHMOD

and those macros are used to conditionalize those functions in 
posixmodule.c.  That doesn't explain why a platform has or doesn't have 
lchmod, but "man lchmod" might fail for you also, as it does for me on 
Ubuntu.

>
> --
> ~Ethan~
>
> [1] https://docs.python.org/2/library/os.html#os.lchmod


-- 
Ned Batchelder, http://nedbatchelder.com




More information about the Python-list mailing list