Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import time, os
- def follow(thefile):
- thefile.seek(0,2)
- while True:
- line = thefile.readline()
- if not line:
- time.sleep(0.1)
- continue
- yield line
- data,temp,msg = [],[],[]
- sp = " "
- logfile = open(os.getenv("APPDATA")+"/.minecraft/logs/latest.log", "r")
- loglines = follow(logfile)
- for line in loglines:
- if "[main/INFO]: [CHAT]" in line and "Brewery" not in line and "Brew" not in line and "whisper" not in line:
- if "ClearLag" in line and "Entities" in line:
- print(line)
- data.append(line)
- for i in line:
- i.split(" ")
- temp.append(i[0])
- temp.append(i[2:])
- msg.append(" ".join(temp.copy()))
- temp.clear()
- #print(msg)
- #print(msg)
- else:
- print(line)
- data.append(line.split(" "))
- print("DATA",data)
- for i in data:
- print(i,"IIIIIIIIII")
- temp.append(i[0])
- temp.append(i[3:])
- print("temp",temp[1])
- r = sp.join(map(str,temp))
- msg.append(r)
- temp.clear()
- print("MSG",msg)
- #print(msg)
- for i in line:
- i.split(" ")
- temp.append(i[0])
- temp.append(i[2:])
- msg.append(" ".join(temp).copy())
- temp.clear()
- print(msg)
Add Comment
Please, Sign In to add comment