Windows: get owner and group of a file

kai rosenthal kairosenthal at tiscali.de
Wed Dec 6 07:46:37 EST 2006


Hello,

with ls -l on windows I get
-rw-r--r-- 1 500 everyone 320 Nov 09 09:35 myfile

How can I get on windows with a standard python 2.2 (without windows
extensions) the information "500" and "everyone" (owner and group)?
Also I cannot use popen('ls -l').

With
import stat
stat_info = os.lstat(myfile)
owner = "%-8s" % stat_info.st_uid
group = "%-8s" % stat_info.st_gid
I get 0 for owner and group.

Thanks for your hints, Kai




More information about the Python-list mailing list