摘要: Donn Lee Python CookbookQuick and easy ways to get python to do what you want it to do.Get the size (in bytes) of a fileFILE = '/home/donn/postip/log.txt'try:filesize = os.path.getsize(FILE)except:print "Error getting size of file %s." % FILEsys.exit()if filesize > 5000000:print 阅读全文
posted @ 2012-07-04 22:19 vigarbuaa 阅读(375) 评论(0) 推荐(0) 编辑