This is the mail archive of the
cygwin
mailing list for the Cygwin project.
Python and file attributes
- From: Steven Penny <svnpenn at gmail dot com>
- To: cygwin at cygwin dot com
- Date: Sun, 28 Jul 2019 18:12:54 -0700 (PDT)
- Subject: Python and file attributes
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