In Python on Windows, is there a way to determine if a user has permission to access a directory? I\'ve taken a look at os.access but it gives false results.>
While os.access tries its best to tell if a path is accessible or not, it doesn't claim to be perfect. From the Python docs:
Note: I/O operations may fail even when access() indicates that they would succeed, particularly for operations on network filesystems which may have permissions semantics beyond the usual POSIX permission-bit model.
The recommended way to find out if the user has access to do whatever is to try to do it, and catch any exceptions that occur.