title: python how to retrieve file flags
body: <p>os module contains function <code>chflags</code> that allows user to modify UNIX file flags: <a href="https://docs.python.org/3/library/os.html" rel="nofollow">https://docs.python.org/3/library/os.html</a></p>
  
  <p>Is there a function that would let me see which flags the file currently has?</p>
  
  <p>I am asking about file flags (equivalent of unix command lsattr or chattr) not permissions (chmod etc)</p>