We now have a youtube channel. Subscribe!

Python os.stat_float_times() Method

Hello dear readers! Welcome back to another section of our tutorial on Python. In this tutorial guide, we are going to be studying about the Os stat_float_times() method.

The Python os stat_float_times() method determines whether the stat_result is representing the time stamp as float objects.


The following below is the syntax for Python Os stat_float_times() method -

os.stat_float_times( [newvalue] )

RECOMMENDED POST: Python os.listdir() Method

Parameter Details

  • newvalue - If newvalue is True, then future calls to stat() returns floats, if it is False, future calls on stat returns ints. If newvalue is not mentioned, it returns the current settings.

Return Value

It returns either True or False.


The following below is a simple example -


import os, sys

# Stat information
statinfo = os.stat('a2.py')

print statinfo
statinfo = os.stat_float_times()
print statinfo

When the above code is executed, it will produce the 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)

Alright guys! This is where we are rounding up for this tutorial post. In our next tutorial, we are going to be discussing about the Python OS statvfs() Method.

Feel free to ask your questions where necessary and i will attend to them as soon as possible. If this tutorial was helpful to you, you can use the share button to share this tutorial.

Follow us on our various social media platforms to stay updated with our latest tutorials. You can also subscribe to our newsletter in order to get our tutorials delivered directly to your emails.

Thanks for reading and bye for now.

Post a Comment

Hello dear readers! Please kindly try your best to make sure your comments comply with our comment policy guidelines. You can visit our comment policy page to view these guidelines which are clearly stated. Thank you.
© 2023 ‧ WebDesignTutorialz. All rights reserved. Developed by Jago Desain