import os import stat st = os.stat('/etc/fstab') # __getitem__ x = st[stat.ST_MTIME] print((x, type(x))) # __getattr__ x = st.st_mtime print((x, type(x)))
(1441565864, <class 'int'>) (1441565864.3485234, <class 'float'>)
July 19th 2016
import os import stat st = os.stat('/etc/fstab') # __getitem__ x = st[stat.ST_MTIME] print((x, type(x))) # __getattr__ x = st.st_mtime print((x, type(x)))
(1441565864, <class 'int'>) (1441565864.3485234, <class 'float'>)