[Python-Dev] os.access on Windows (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Fri May 20 23:56:01 CEST 2011
- Previous message: [Python-Dev] os.access on Windows
- Next message: [Python-Dev] os.access on Windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
TBH I think the less attractive we can make os.access() look the better. It uses the real uid instead of the effective uid, it encourages LBYL behavior, the outcome may be incorrect, it doesn't work on Windows... The ONLY reason to ever use it is in a setuid() program. But who writes those any more? (Esp. in Python!)
+1. The best way to determine "could I access this file" is to try to access it, and be prepared to get an exception. So we might deprecate-then-delete it on Windows.
People who really need to know in advance should use the Windows API for that on Windows (i.e. call AccessCheck).
Regards, Martin
- Previous message: [Python-Dev] os.access on Windows
- Next message: [Python-Dev] os.access on Windows
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]