Movatterモバイル変換
[0]ホーム
[Python-Dev] Returning Windows file attribute information viaos.stat()
Ben Hoytbenhoyt at gmail.com
Tue Jun 10 14:20:56 CEST 2014
>> if hasattr(st, 'st_winattrs') and st.st_winattrs &>> FILE_ATTRIBUTE_HIDDEN:>> That could be written more succinctly as:>> if getattr(st, 'st_winattrs', 0) & FILE_ATTRIBUTE_HIDDEN:>>> return True>> return FalseYes, good call. Or one further: return getattr(st, 'st_winattrs', 0) & FILE_ATTRIBUTE_HIDDEN != 0-Ben
More information about the Python-Devmailing list
[8]ページ先頭