From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 47895 invoked by alias); 29 Jul 2019 08:06:07 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 47888 invoked by uid 89); 29 Jul 2019 08:06:06 -0000 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 Received: from mout.kundenserver.de (HELO mout.kundenserver.de) (212.227.17.24) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 29 Jul 2019 08:06:05 +0000 Received: from calimero.vinschen.de ([24.134.7.25]) by mrelayeu.kundenserver.de (mreue108 [212.227.15.183]) with ESMTPSA (Nemesis) id 1Mc06b-1iNUfN3Vbr-00dSyX for ; Mon, 29 Jul 2019 10:06:02 +0200 Received: by calimero.vinschen.de (Postfix, from userid 500) id 1E4EEA8049B; Mon, 29 Jul 2019 10:06:01 +0200 (CEST) Date: Mon, 29 Jul 2019 08:06:00 -0000 From: Corinna Vinschen To: cygwin@cygwin.com Subject: Re: Python and file attributes Message-ID: <20190729080601.GK11632@calimero.vinschen.de> Reply-To: cygwin@cygwin.com Mail-Followup-To: cygwin@cygwin.com References: <5d3e4816.1c69fb81.73fb3.5121@mx.google.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="MFZs98Tklfu0WsCO" Content-Disposition: inline In-Reply-To: <5d3e4816.1c69fb81.73fb3.5121@mx.google.com> User-Agent: Mutt/1.11.3 (2019-02-01) X-SW-Source: 2019-07/txt/msg00248.txt.bz2 --MFZs98Tklfu0WsCO Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-length: 950 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 "", line 1, in > 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" Content-length: 833 -----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--