X-Recipient: archive-cygwin@delorie.com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:to:subject:content-type;
	 q=dns; s=default; b=SNGNgCbKstn4UU8We9DUUBf/T4v0BVlm+mOGjhywOrM
	ZLzBZGR19WM7ClAW9fFNBVixoRG6pZVLStOqeniXQhYJS/UC0zh4yfjxsZXfCEta
	uqE3BCTBZg7Yb7Os7tY6kKKjuzJzQzikhwwm8hhZHAOy89zXqYrsVXSJFGMZNNpU
	=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
	:list-unsubscribe:list-subscribe:list-archive:list-post
	:list-help:sender:message-id:date:from:to:subject:content-type;
	 s=default; bh=ORdV+1fUf7rypFFxmfOzKOm7IiU=; b=HISAKUpVOsyIgomFT
	8PZpNkQYBe7bkbfSieBG6cHeab9aVbaQhWhpniMiYZKEbY0d0oNLsWwi16CriMkT
	z8c6ezepN9TX9L2bngBAoaZ/qzT2NIXghfh2m6vRtPdzi5sL9eLaHQ3TedqBL2L0
	dNx0G2TgJlSYJ7EWmhGoD/o73s=
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-0.5 required=5.0 tests=BAYES_05,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.1 spammy=recovery, Recovery, H*MI:1c69fb81, HX-Languages-Length:576
X-HELO: mail-ot1-f54.google.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com; s=20161025;        h=message-id:date:from:to:subject:user-agent;        bh=10Vh/dN93rSQBNjSHFfSeRSD26DXFT2aAKnlakIB/GI=;        b=SP8UQv88e5Fep7UqlQD6jXo1AHZ9GOOjLcs/V1KB8+7jM7yq1RRc2jIc7D+TeVXNWD         rEMKsziaCcf5kGGptQwmY7TyLk1dWpcQBlBulHLtP7v3z2a2RRhagV54u0IkYRHdK/Uc         wvrmIjK7QL9pIoqMUQ3tBMBjG8rO4PE2g5yrIDbdssU2m2bE6gZsWUSjbCdnvCkU/kGr         k9zVFeF31+DhraDmPPM1QpoCkfNShLUITCtqOH5Yu2HBIGYZoSdolwEleBZCwCFYsHhS         y1+D8Ech1mq4nZyRWQKFtvMF3MyYO15sjf9PzTJoj2P7bIFC9JUWbCVREOnpyJdi5sUe         aiQg==
Message-ID: <5d3e4816.1c69fb81.73fb3.5121@mx.google.com>
Date: Sun, 28 Jul 2019 18:12:54 -0700 (PDT)
From: Steven Penny <svnpenn@gmail.com>
To: cygwin@cygwin.com
Subject: Python and file attributes
Content-Type: text/plain; charset=utf8; format=flowed
User-Agent: Suede Mail/2.8.0 (github.com/cup/suede)

The Windows version of Python can access file attributes:

    >>> import os
    >>> os.stat('C:\Recovery').st_file_attributes
    8214

https://docs.python.org/library/os#os.stat_result.st_file_attributes

However the Cygwin version cannot:

    >>> import os
    >>> os.stat('C:\Recovery').st_file_attributes
    Traceback (most recent call last):
    File "<stdin>", line 1, in <module>
    AttributeError: 'os.stat_result' object has no attribute
    'st_file_attributes'

This is unexpected as other Cygwin tools can access this information:

    $ lsattr
    -hs------n-- ./Recovery


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

