小白教程
所有教程
关于
Search
172.70.130.241
172.70.130.241
参数设置
贡献
退出
操作
编辑
移动
保护
信息
历史
删除
查看“Python3 os stat float times”的源代码
本页内容
上一节:
Python3_os_stat
下一节:
Python3_os_statvfs
因为以下原因,您没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看和复制此页面的源代码。
{{DISPLAYTITLE:os.stat_float_times([newvalue])}}[[Category:python3 os file methods|51]] = Python3 os.stat_float_times() 方法 = [[python3 os file methods|Python3 OS 文件/目录方法]] === 概述 === os.stat_float_times() 方法用于决定stat_result是否以float对象显示时间戳。 === 语法 === '''stat_float_times()'''方法语法格式如下: <sample title="" desc="" lang="python" hererun="1"> os.stat_float_times([newvalue]) </sample> === 参数 === * '''newvalue''' -- 如果为 True, 调用 stat() 返回 floats,如果 False, 调用 stat 返回 ints。如果没有该参数返回当前设置。 === 返回值 === 返回 True 或 False。 == 以下实例演示了 stat_float_times() 方法的使用: <sample title="" desc="" lang="python" hererun="1"> #!/usr/bin/python3 import os, sys # Stat 信息 statinfo = os.stat('a2.py') print (statinfo) statinfo = os.stat_float_times() print (statinfo) </sample> 执行以上程序输出结果为: <sample title="" desc="" lang="python" hererun="1"> 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 </sample> [[python3 os file methods|Python3 OS 文件/目录方法]]
返回至“
Python3 os stat float times
”。
上一节:
Python3_os_stat
下一节:
Python3_os_statvfs