UID/GID in python
Matthew Dixon Cowles
matt at mondoinfo.com
Wed Feb 7 16:11:05 EST 2001
On Wed, 7 Feb 2001 15:58:56 -0500, Jay Collins <jcollin at exis.net>
wrote:
>What is the best way to get the uid.gid of a file in python?
os.stat("foo")[stat.ST_UID]
and similarly with stat.ST_GID
>is there someting that when you do like info(filename) returns the
>gid,uid, file size times etc?
os.stat() returns the data as a tuple and the stat module has symbolic
names for the items in the tuple.
Regards,
Matt
More information about the Python-list
mailing list