Note: I'm working on Python 3.x on Windows.
I've been working on this for quite a while, and I've found the solution on UNIX systems to be pretty easy.
os.stat("filename").st_uid
On Windows this just returns 0
I've found a solution that works sometimes
cmd = 'dir /q %s' % "filename"
usr = os.popen(cmd).read().split()[-11]
return usr
However, it doesn't always work, sometimes it'll error with the following:
IndexError: list index out of range
When it does work, it outputs
DOMAIN\USERNAME
During all of my searching over the past week or so, I've found several solutions that seem to work well in UNIX/LINUX but only the above solution works in Windows, and it's not consistent.