摘要: import time,datetime1、时间戳、格式化时间之间的转换#时间戳 从unix元年开始,每过1s加1,小数点后是微秒print(time.time())#当前时间戳print(time.strftime('%Y-%m-%d %H:%M:%S'))#格式化好的时间#时间元组result= 阅读全文
posted @ 2020-05-21 09:29 zntest 阅读(169) 评论(0) 推荐(0) 编辑
摘要: 1、os模块常用命令: import os①os.pathprint(os.path.join('e:','movies','a.mp4'))#拼路径,等同于"E:\\movies\\"+'a.mp4'print(os.path.exists('e:'))#判断目录/文件是否存在print(os.p 阅读全文
posted @ 2020-05-21 09:06 zntest 阅读(156) 评论(0) 推荐(0) 编辑