[Python-Dev] os.access on Windows
Tim.Golden at cbsoutdoor.co.uk
Fri May 20 10:38:24 CEST 2011
There's a thread on python-list at the moment:
which is discussing the validity of os.access results on
Windows. Now we've been here before: I raised issue2528
for a previous enquiry some years ago and proffered a patch
which uses the AccessCheck API to perform the equivalent check,
but didn't follow through.
Someone on the new thread is suggesting -- validly -- that the
docs should highlight the limitations of this call on Windows.
But the docs for that call are already fairly involved:
We seem to have a few options in increasing order of difficulty:
* Do nothing - inform the occasional enquirer of the situation and
leave it at that.
* Update the docs to add something which describes what the function
actually does on the Windows platform. (Whether or not we change any code).
* Apply the patch in issue2528 to 3.3 and maybe 2.7
* Leave os.access alone but offer alternative Windows-specific
functionality in the os module or elsewhere, using essentially
the code in the issue2528 patch.
As a side note, the pywin32 packages don't actually include AccessCheck
at the moment. (Which makes it slightly harder to explain to people
how they could do this check for themselves). It could probably be added
over there which might ease the burden over here.
Very Senior Analyst Programmer
CBS Outdoor UK
28 Jamestown Road
T: 020 7482 3000
F: 020 7267 4944
Don't waste paper. Think before you print.
The contents of this e-mail are confidential to the ordinary user of the e-mail address to which it was addressed, and may also be privileged. If you are not the addressee of this e-mail you may not copy, forward, disclose or otherwise use it or any part of it in any form whatsoever. If you have received this e-mail in error, please e-mail the sender by replying to this message. CBS Outdoor Ltd reserves the right to monitor e-mail communications from external/internal sources for the purposes of ensuring correct and appropriate use of CBS Outdoor facilities. CBS Outdoor Limited, registered in England and Wales with company number 02866133 and registered address at Camden Wharf, 28 Jamestown Road, London, NW1 7BY.
This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
More information about the Python-Dev