python检测文件是否更新
时间:2015-04-14 17:57:53
收藏:0
阅读:898
import os
import time
filename = "test.txt"
info = os.stat(filename)
if time.time()-info.st_mtime > 600:#10分钟
print "done"
else:
print "modify"
原文:http://www.cnblogs.com/DjangoBlog/p/4425574.html
评论(0)