results of stat[ST_ATIME]???????
Douglas Zongker
dougz at cs.washington.edu
Tue Jun 18 18:40:42 EDT 2002
jubafre at zipmail.com.br wrote:
: when i use st[ST_ATIME] a int number is returned, how i can transform
: this number to a "time number"???????
What do you mean by "time number"? The file times given by stat() are
just like the values returned by time.time(), except that they're ints
instead of floats. You can do all the same things with them:
>>> import os, time
>>> access = os.stat('/tmp/foo').st_atime
>>> access
1024439265
>>> time.ctime(access)
'Tue Jun 18 15:27:45 2002'
>>> time.localtime(access)
(2002, 6, 18, 15, 27, 45, 1, 169, 1)
dz
More information about the Python-list
mailing list