On 30/08/2012 12:54, boltar2003@boltar.world wrote:
Hello
I'm slowly teaching myself python so apologies if this is a dumb question.
but something has confused me with the os.stat() function:
s = os.stat(".")
print s
posix.stat_result(st_mode=16877, st_ino=2278764L, st_dev=2053L, st_nlink=2, st_u
id=1000, st_gid=100, st_size=4096L, st_atime=1346327745, st_mtime=1346327754, st
_ctime=1346327754)
What sort of object is posix.stat_result? Its not a dictionary or list or a
class object as far as I can tell. Thanks for any help.
What don't you ask Python? I'm sure you'' get something like this:
>>> type(s)
<class 'posix.stat_result'>
In other words, it's an instance of the class "stat_result" as defined
in the file "posix.py".
On my system I get "<class 'nt.stat_result'>" because I'm using Windows.
--
http://mail.python.org/mailman/listinfo/python-list