title: How do i determine if a file is read only
body: <p>I'm writing a shell in python and need to determine if a file is read only for the current user. How do i interpret <code>os.stat(path)[0]</code> for a given user.
  This isn't trivial on linux you may get write permissions because of user group or others. Then there's the concept of a user being in the files group with group write but is the owner with read only permissions.
  I need this to be cross platform so it works on Mac Linux and Windows.</p>