> It would be awfully nice (on posix platforms, for my use-case) to find > out whether a file is inaccessible due to permission restrictions, or > due to non-existence. Why can't you solve this by doing a stat() when access() returns False? Also, in general I recommend against using access() except for setuid apps that need to test whether the *real* user id has the desired access; there are many additional reasons why opening a file fails even though access() returns True; amongst the causes can be race conditions (the file was changed after you called access() or conditions like ETXTBSY (you can't write an executable file that is being executed) or ENOMEM (a kernel resource problem). -- --Guido van Rossum (home page: http://www.python.org/~guido/)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4