os.access() problem

Phil Schmidt phil_nospam_schmidt at yahoo.com
Tue Jul 11 11:05:54 EDT 2006


I just got a new PC with Windows XP, and I want to run Leo on it. Leo
uses the os.access() function to check for read-only files. For some
reason, os.access(<filename>, os.W_OK) always returns false.

I wrote a 2-liner Python script to just test os.access on any file.
I have tried this with Python 2.4 and 2.5b1.
I have uninstalled and re-installed Python and Leo.
I have fiddled with file permissions on the target files as well as on
the Python installation itself.
I have used cacls to check the access control lists (and although I'm
not exactly certain what to do with this information, it appears to be
ok - I think).

None of the above has helped me to identify or fix the problem.

A scan of the Python newsgroup suggests that os.access() may not be the
best way to check for read-only, but the discussion is a bit deeper
than my understanding, so I'm not sure there's anything to it in this
case.

I realize this must be a Windows permissions thing, but I just can't
figure it out. I'm no expert in Windows security beyond basic
permissions, so I could be missing something simple. Can anyone offer
any suggestions?

Thanks,
Phil




More information about the Python-list mailing list