On Nov 26, 8:56 pm, Cong Ma <[EMAIL PROTECTED]> wrote:
> Thanks for your reply. I checked my Python 2.5 install on Linux and there's 
> the
> O_DIRECTORY flag. However this is not mentioned anywhere in the Library 
> Reference.

Yes, I just noticed that myself.

>        O_DIRECTORY
>               If pathname is not a directory, cause the open  to  fail.   This
>               flag is Linux-specific, and was added in kernel version 2.1.126,

Well, that certainly explains it's absence :)

> Note the "should not be used outside of the implementation of opendir(3)" 
> part.
> Does that mean using Python's os.open() with the O_DIRECTORY flag is a Bad
> Thing?

I'm sorry, that's outside of my knowledge. But it seemed to work fine
when I tried it.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to