A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2011-May/111547.html below:

[Python-Dev] os.access on Windows

[Python-Dev] os.access on Windows [Python-Dev] os.access on Windows"Martin v. Löwis" martin at v.loewis.de
Fri May 20 23:56:01 CEST 2011
> 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
More information about the Python-Dev mailing list

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