python处理大日志文件
本文实例为大家分享了python处理大日志文件的具体代码,供大家参考,具体内容如下 # coding=utf-8 import sys import time class Tail(): def __init__(self,file_name,callback=sys.stdout.write): self.file_name = file_name self.callback = callback def follow(self,n=10): try: # 打开文件 with open(self.file_name) as f: self._file
下载地址
用户评论