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?

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

Reply via email to