How to access Mac-specific file metadata?
Question: According to this page, different operating systems can return different
information from the os.stat function.

<http://docs.python.org/2/library/os.html>

I am interested in getting the type and creator.

    
    
    import os
    from stat import *
    print(os.stat('filename').st_ino)
    print(os.stat('filename').st_creator)
    

This code works for the inode (st_ino) but gives an error for the creator:

> AttributeError: 'posix.stat_result' object has no attribute 'st_creator'

Same for st_type and st_rsize.

Do I have to do anything special to get these to work?

(This is Mac OS X 10.5 and 10.8 with Python 2. I'm new to Python.)


Answer: "Mac OS" in the docs here means Mac OS Classic, i.e., before the X. For OSX,
the unix and FreeBSD comments are relevant.

