delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2019/07/29/04:06:52

X-Recipient: archive-cygwin AT delorie DOT 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:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; q=dns; s=
default; b=OKc45+qcAzVlvp7FwxOiHJwr/y3/ogmVi4xwjUfJd560HMo7Gp601
vvbaeTBY0xoBednjhkjqlDbqBXqERHsoazN3RYn7ioj5J+trWMwjjex9v+kUk7p2
9/77V/5adcpks9EPsq8ChkDjD8UAnFABwGblr0z/jAd+FvZJ03KXAI=
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:date:from:to:subject:message-id:reply-to
:references:mime-version:content-type:in-reply-to; s=default;
bh=vp8PWVrDprVaRzmOShNddDnB/xs=; b=fz4/LLquj1qBSbHrjFeUTf90XFHd
zrMlrOhTmgRzvsp1P5px/JS8G9W28fOVcAySARMHErFgkXHE6lmVR7MS82nUUVG2
yDo6xbkDwpv0CVH+AnD83/xlUWr+Te89yukRSrLtEvv4ojcIl3HNQlYE1OnlVTsp
5KII+z66PtQJVHU=
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Authentication-Results: sourceware.org; auth=none
X-Spam-SWARE-Status: No, score=-106.3 required=5.0 tests=AWL,BAYES_00,GOOD_FROM_CORINNA_CYGWIN,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy=penny, Penny
X-HELO: mout.kundenserver.de
Date: Mon, 29 Jul 2019 10:06:01 +0200
From: Corinna Vinschen <corinna-cygwin AT cygwin DOT com>
To: cygwin AT cygwin DOT com
Subject: Re: Python and file attributes
Message-ID: <20190729080601.GK11632@calimero.vinschen.de>
Reply-To: cygwin AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
References: <5d3e4816 DOT 1c69fb81 DOT 73fb3 DOT 5121 AT mx DOT google DOT com>
MIME-Version: 1.0
In-Reply-To: <5d3e4816.1c69fb81.73fb3.5121@mx.google.com>
User-Agent: Mutt/1.11.3 (2019-02-01)

--MFZs98Tklfu0WsCO
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Jul 28 18:12, Steven Penny wrote:
> The Windows version of Python can access file attributes:
>=20
>    >>> import os
>    >>> os.stat('C:\Recovery').st_file_attributes
>    8214
>=20
> https://docs.python.org/library/os#os.stat_result.st_file_attributes
>=20
> However the Cygwin version cannot:
>=20
>    >>> 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'
>=20
> This is unexpected as other Cygwin tools can access this information:
>=20
>    $ lsattr
>    -hs------n-- ./Recovery

No, it's not unexpected.  Attributes are new since Cygwin 3.0 so this
would have required a python rebuild. The Cygwin utilities lsattr/chattr
are very likely the *only* tools being able to access these attributes
at this time.


Corinna

--=20
Corinna Vinschen
Cygwin Maintainer

--MFZs98Tklfu0WsCO
Content-Type: application/pgp-signature; name="signature.asc"

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCAAdFiEEoVYPmneWZnwT6kwF9TYGna5ET6AFAl0+qOgACgkQ9TYGna5E
T6DSFhAAmR2pC3L8q5EXnDAuo+gPRIp5co3tMrHEJqNfop0JjCIfGKHJwoGP907P
mp45tOXb5pN9lT1avfUXohLIPlA7j01wFaHKCSSpOCqY9IMPq33rPQfl1aX6w2aR
Nhmxd3RUr2jynqe94Dsq+Ji8nFofKRHULfAGYIzG4mk6gKt4XUiHJFG4wYNE4dGN
FpriN0XOws7bPg5mkTkbOp6dbZSsoajhQeyz0dkTwInV+D37KbhtCbUBWN14+AkU
S5aKm9TW06dVPjjXUApw4r7ws1LzGHu7sAgiD4Fy4QAyWW6gvl1vL+4u1+KTAN8Y
8+bEGj2FXXEwCReHxeO/L26LGnJ4NKEgnNJQaljNd7FOeBu1aWJrc/zY0mqCiVqY
LAsst0t/IYuvMuH/fCWUq+lybN6UVHGyMeMlasd3tl2phGD2q2qePyFmAwtQIYFe
A712FIaIsxIkZ8ZZKOSWyxWtuN5rKnb3Q1CzUY1fMnusXGO/BCP5mDw3odO5U2X3
KJFE5no9HV1Yp0kiUp8CVtwn3BJbSyOtR/iZY1WeDLT0XoxX08Xb0E15VmJ1xwiP
PT6RMLwEReWp8FK1CbZ7cC0+SlSYxRrwRPcWx7NhEvDp4jZiqGQr+NoR1BYu2n7Y
w3vbeESKG7c2TNXNRuyu5LYIXOCUqoP1Bk8CEuc+PaUodpLaJ/U=
=tawq
-----END PGP SIGNATURE-----

--MFZs98Tklfu0WsCO--

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019