Python os.stat_float_times() Method
Python method stat_float_times() determines whether stat_result represents time stamps as float objects.
The stat_float_times() method of the Python os module is deprecated. It will not be available in future versions of Python.
Syntax
Following is the syntax for Python os.stat_float_times() method −
os.stat_float_times([newvalue])
Parameters
The Python os.stat_float_times() method accepts a single parameter −
newvalue − If newvalue is True, future calls to stat() return floats, if it is False, future call on stat returns ints. If newvalue is not mentioned, it returns the current settings.
Return Value
The Python os.stat_float_times() method returns either True or False.
Example
The following example shows the usage of stat_float_times() method.
import os, sys
# Stat information
statinfo = os.stat('a2.py')
print statinfo
statinfo = os.stat_float_times()
print statinfo
When we run above program, it produces following result −
posix.stat_result(st_mode=33188, st_ino=3940649674337682L, st_dev=277923425L, st_nlink=1, st_uid=400, st_gid=401, st_size=335L, st_atime=1330498089, st_mtime=13 30498089, st_ctime=1330498089) True
os_file_methods.htm
Advertisements