read_rz(输入1,输入你日志的相对目录),就会得到你日志的最近一行文件:

def read_rz(x, y):
    b = -1 * abs(x)
    a = open(y, 'rb')
    while True:
        a.seek(b, 2)
        c = a.readlines()
        if len(c) > 1:
            print(c[-1].decode('utf-8'))
            break
        b *= 2

 

posted on 2018-05-08 01:27  我赌,但我获胜  阅读(92)  评论(0编辑  收藏  举报