2014-06-10 6:02 GMT+02:00 Ben Hoyt <benhoyt at gmail.com>: > To solve this problem, what do people think about adding an > "st_winattrs" attribute to the object returned by os.stat() on > Windows? > (...) > FILE_ATTRIBUTE_HIDDEN = 2 # constant defined in Windows.h > > if hasattr(st, 'st_winattrs') and st.st_winattrs & FILE_ATTRIBUTE_HIDDEN: I don't like such API, it requires to import constants, use masks, etc. I would prefer something like: if st.win_hidden: ... Or maybe: if st.winattrs.hidden: ... Victor
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4