A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-June/134996.html below:

[Python-Dev] Returning Windows file attribute information via os.stat()

[Python-Dev] Returning Windows file attribute information via os.stat() [Python-Dev] Returning Windows file attribute information via os.stat()Victor Stinner victor.stinner at gmail.com
Tue Jun 10 11:34:57 CEST 2014
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
More information about the Python-Dev mailing list

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