E
Evan Klitzke
Everyone,
I'm interested in writing a python program that reads from a log file
and then executes actions based on the lines. I effectively want to
write a loop that does something like this:
while True:
log_line = log_file.readline()
do_something(log_line)
Where the readline() method blocks until a new line appears in the
file, unlike the standard readline() method which returns an empty
string on EOF. Does anyone have any suggestions on how to do this?
Thanks in advance!
I'm interested in writing a python program that reads from a log file
and then executes actions based on the lines. I effectively want to
write a loop that does something like this:
while True:
log_line = log_file.readline()
do_something(log_line)
Where the readline() method blocks until a new line appears in the
file, unlike the standard readline() method which returns an empty
string on EOF. Does anyone have any suggestions on how to do this?
Thanks in advance!