1.判断文件是否存在 (import os) os.path.isfile 2.获取当前时间的时间戳 (import time) s_time = int(time.mktime(time.localtime(time.time())))