import os
fpath = os.path.expandvars(r"%appdata%\.minecraft\logs\latest.log")
with open(fpath) as f:
f.seek(-1) # jump to end
while True:
line = f.readline()
if not line:# no new text
# might want to add a bit of a sleep
continue
print("Log Line:",line)
只需解析最新的日志文件。。。我不知道为什么你会试图分析一些窗口的东西。。。你知道吗
像这样的
相关问题 更多 >
编程相关推荐