YouTip LogoYouTip

Python3 Os Stat_Float_Times

# Python3.x Python3 os.stat_float_times() Method [![Image 3: Python3 OS File/Directory Methods](#) Python3 OS File/Directory Methods](#) * * * ### Overview The `os.stat_float_times()` method is used to determine whether `stat_result` displays timestamps as float objects. ### Syntax The syntax for the **`stat_float_times()`** method is as follows: os.stat_float_times() ### Parameters * **newvalue** -- If True, calling `stat()` returns floats. If False, calling `stat()` returns ints. If this parameter is not provided, it returns the current setting. ### Return Value Returns True or False. ### Example The following example demonstrates the use of the `stat_float_times()` method: #!/usr/bin/python3import os, sys # Stat information statinfo = os.stat('a2.py')print (statinfo) statinfo = os.stat_float_times()print (statinfo) The output of the above program is: 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=1330498089, st_ctime=1330498089)True [![Image 4: Python3 OS File/Directory Methods](#) Python3 OS File/Directory Methods](#)
← Python3 Os SymlinkPython3 Os Rmdir β†’