Python方法stat_float_times()确定stat_result是否将时间戳表示为浮动对象。
os.stat_float_times([newvalue])
newvalue - 如果newvalue为True,则将来对STAT()的调用将返回浮点数,如果为False,则以后对STAT的调用将返回int。如果未提到newvalue,则返回当前设置。
此方法返回True或False。
以下示例显示stat_float_times()方法的用法。
#!/usr/bin/python import os, sys # 统计信息 statinfo=os.stat('a2.py') print statinfo statinfo=os.stat_float_times() print statinfo
当无涯教程运行上面的程序时,它产生以下输出-
链接:https://www.learnfk.comhttps://www.learnfk.com/python/os-stat-float-times.html
来源:LearnFk无涯教程网
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
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)