STINNER Victor <victor.stin...@haypocalc.com> added the comment: 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') ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11457> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com