predict directory write permission under windows?
Larry Bates
lbates at syscononline.com
Mon Dec 13 10:03:48 EST 2004
My method isn't elegant, but I use tempfile to create a
tempfile in the directory (inside a try block). If it
works, closing the file makes it go away.
Larry Bates
Syscon, Inc.
Qiangning Hong wrote:
> I want to know if I can write files into a directory before I actually
> perferm the write behavor. I found os.access(path, os.W_OK) but it uses
> real uid/gid to check instead of euid/egid so it doesn't fit my problem.
>
> I don't know how to get euid/egid under windows so I cannot use the mode
> infomation returned by os.stat().
>
> Anybody give me a hint?
>
More information about the Python-list
mailing list