- 博客(2)
- 收藏
- 关注
原创 文件及目录常见操作分类整理
查看文件和目录 方法名 说明 os.getcwd() 返回当前工作目录 os.path.realpath(path) 返回path的真实路径 os.stat(path) 获取path指定的路径的信息 os.path.getsize(path) 返回文件大小,如果文件不存在就返回错误 os.path.getctime(path) 返回文件 path 创建时间 os...
2019-12-29 21:58:07
1910
原创 Python time模块3种时间格式化转化
Timestamp 时间戳 从1970年1月1日00:00:00开始计数的秒数。 struct_time 时间元组 时间元组(struct_time)方式:struct_time元组共有9个元素,返回struct_time的函数主要有gmtime(),localtime(),strptime()。下面列出这种方式元组中的几个元素: 索引(Index) 属性(Attribute) 值(Val...
2019-12-27 09:24:14
869
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人