You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
665 B
31 lines
665 B
2 years ago
|
from concurrent.futures import thread
|
||
|
import glob
|
||
|
|
||
|
|
||
|
nama_log = "auto_replytoaccNretweet.log"
|
||
|
|
||
|
def last_log():
|
||
|
with open(nama_log, 'r') as f:
|
||
|
lines = f.readlines()
|
||
|
lastline = lines[-1]
|
||
|
lastsplit = lastline.split(" - ",1)
|
||
|
logs = lastsplit[0]
|
||
|
|
||
|
return f"Last log: {logs}"
|
||
|
|
||
|
print(f"{last_log()}")
|
||
|
|
||
|
#with open(nama_log, 'r') as logfile:
|
||
|
# lines = logfile.readlines()
|
||
|
#
|
||
|
#for baris in lines:
|
||
|
# str1 = baris.split(" - ",1)
|
||
|
# strtimestamp = str1[0]
|
||
|
# last_log = strtimestamp
|
||
|
# print(f"{last_log}")
|
||
|
|
||
|
#with open(nama_log, 'r') as f:
|
||
|
# lines = f.readlines()
|
||
|
# lel = lines[-1]
|
||
|
#
|
||
|
# print(f"{lel}")
|