Message152355
I attached a more complete patch to the issue #13882: it adds an optional timestamp format to os.stat(), os.lstat(), os.fstat(), os.fstatat().
Examples:
$ ./python
Python 3.3.0a0 (default:2914ce82bf89+, Jan 30 2012, 23:07:24)
>>> import os
>>> s=os.stat("setup.py", timestamp="datetime")
>>> s.st_mtime - s.st_ctime
datetime.timedelta(0)
>>> print(s.st_atime - s.st_ctime)
52 days, 1:44:06.191293
>>> os.stat("setup.py", timestamp="timespec").st_ctime
(1323458640, 702327236)
>>> os.stat("setup.py", timestamp="decimal").st_ctime
Decimal('1323458640.702327236') |
|
Date |
User |
Action |
Args |
2012-01-30 22:44:00 | vstinner | set | recipients:
+ vstinner, loewis, rhettinger, jcea, mark.dickinson, belopolsky, lars.gustaebel, larry, nadeem.vawda, Arfrever, r.david.murray, skrah, Alexander.Belopolsky, rosslagerwall, khenriksson, ericography |
2012-01-30 22:44:00 | vstinner | set | messageid: <1327963440.72.0.787817674063.issue11457@psf.upfronthosting.co.za> |
2012-01-30 22:44:00 | vstinner | link | issue11457 messages |
2012-01-30 22:43:59 | vstinner | create | |
|