file = open('test.log', 'r')
sizehint = 209715200 # 200M
position = 0
lines = file.readlines(sizehint)
while not file.tell() - position < 0:
position = file.tell()
lines = file.readlines(sizehint)
python读取文件:固定大小内容
最新推荐文章于 2021-03-02 17:13:32 发布