Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #5788

Re: os.access giving incorrect results on Windows

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!selfless.tophat.at!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <bahamutzero8825@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'python,': 0.01; 'beginner': 0.04; '3.2': 0.05; 'attributes': 0.05; ':-)': 0.06; 'interpreter': 0.07; 'read-only': 0.07; 'python': 0.08; 'attribute': 0.09; 'received:209.85.160.174': 0.09; 'received :mail-gy0-f174.google.com': 0.09; 'pm,': 0.10; 'wrote:': 0.14; 'shot.': 0.16; 'wording': 0.16; 'appropriate.': 0.19; 'subject:Windows': 0.20; 'header:In-Reply-To:1': 0.21; 'seems': 0.21; 'commit': 0.22; 'code': 0.24; "doesn't": 0.25; 'saying': 0.26; 'windows': 0.26; "i'm": 0.27; 'received:209.85.160': 0.29; 'do.': 0.30; 'entry': 0.31; 'propose': 0.32; 'does': 0.33; 'to:addr:python-list': 0.33; "isn't": 0.33; 'file': 0.34; 'header :User-Agent:1': 0.35; 'fails': 0.35; 'else': 0.35; 'message- id:@gmail.com': 0.36; 'quite': 0.36; 'open': 0.36; 'running': 0.37; 'received:google.com': 0.37; 'something': 0.37; 'received:209.85': 0.37; 'could': 0.38; 'but': 0.38; 'subject:: ': 0.38; 'some': 0.38; 'received:192': 0.38; 'user': 0.39; 'received:209': 0.39; 'to:addr:python.org': 0.39; 'under': 0.40; 'received:192.168.1': 0.40; 'more': 0.60; 'fit.': 0.67; 'golden': 0.67; 'care': 0.72; 'agreement.': 0.91; 'something.': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:date:from:user-agent:mime-version:to :subject:references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; bh=Wj9R0TlSltze3EIqIFAUEOj4P0VD9iACf97mvJpEnls=; b=l6WSCvH1BGTjBJe4JumPkmwcpTfCCqUQjAfYeFzNE+42HmMim1WddSfr1NO9URb8aw F3jSpnSbw+giYBQREK2gOBMUdnmFurqeXdQ2A9wBao4HR8YztnevFVeYzBgAtDTgfeVP qmailA1cOxfr96NUQiXU307on8xACneCu4hi4=
DomainKey-Signature a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=gmj0tkBOKtG5297ejpcPACdiOSHkuoS2wmGn+bZKifEHijEOaeAoMAiBEfc9Yjftm6 kfEwgoeRdQfcyCg8k8xvu+GIDUk/qMuzkoA6NTvzHt1UXwONzhCBYe+POZ+BEJalqnZQ OT1maDKomaUe2/3YNJ1o4eG5WchI/KJTMWWYY=
Date Thu, 19 May 2011 15:40:26 -0500
From Andrew Berg <bahamutzero8825@gmail.com>
User-Agent Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9 ThunderBrowse/3.3.5
MIME-Version 1.0
To python-list@python.org
Subject Re: os.access giving incorrect results on Windows
References <21581D39FA3BDF40904D75AF9653CE2606567E4A@blrex.prog.altair.com> <4DD572FB.2010809@timgolden.me.uk> <4DD575E1.9060801@gmail.com> <4DD578AF.3000001@timgolden.me.uk>
In-Reply-To <4DD578AF.3000001@timgolden.me.uk>
X-Enigmail-Version 1.1.1
Content-Type text/plain; charset=ISO-8859-1
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1802.1305837633.9059.python-list@python.org> (permalink)
Lines 20
NNTP-Posting-Host 82.94.164.166
X-Trace 1305837634 news.xs4all.nl 49184 [::ffff:82.94.164.166]:37221
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:5788

Show key headers only | View raw


On 2011.05.19 03:08 PM, Tim Golden wrote:
> * A R_OK check always succeeds if the file's attributes can be read
>    at all
So is this the same as F_OK then, or does it return false if the user
isn't allowed to read permissions?
> * A W_OK check fails if the file has its DOS read-only attribute set
DOS attribute?
> * A W_OK check always succeeds for a directory (because read-only means
>    something else for directories).
>
> Would you care to propose some wording for the docs? I'm quite happy
> to commit if we can come to an agreement.
I'm a beginner when it comes to Python, but I could give it a shot. A
big red warning box explaining how the code under Windows doesn't use
ACLs under the os.access() entry (above the notes) seems appropriate. A
warning box under os.W_OK saying something like "Under Windows, access()
will always indicate that a directory is writable." would also fit. You
know more about this than I do. I'm running Windows 7 right now and I
have a Python 3.2 interpreter window open if you want me to test/confirm
something. :-)

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: os.access giving incorrect results on Windows Andrew Berg <bahamutzero8825@gmail.com> - 2011-05-19 15:40 -0500

csiph-web