hey, great util. thanks. i notice that in follow(self,delay=1.0) there is the following code:
if line[-1] in self.line_terminators:
line = line[:-1]
if line[-1:] == '\r\n' and '\r\n' in self.line_terminators:
# found crlf
line = line[:-1]
but if this is NOT true, then that means we have a line that does not end in a line_terminator. this happens when you've reached the end of a file that you are tailing and the producer of the file is flushing midway through a line.
I would imagine you need to do the following:
if line[-1] in self.line_terminators:
line = line[:-1]
if line[-1:] == '\r\n' and '\r\n' in self.line_terminators:
# found crlf
line = line[:-1]
else:
#Got a partial line
trailing=True;self.seek(where);time.sleep(delay); continue
*My b if this format is annoying. I'm far too lazy to create pull requests and I have no idea how markdown works. 5min is about all the time I have committed to this bug report. Peace
hey, great util. thanks. i notice that in follow(self,delay=1.0) there is the following code:
but if this is NOT true, then that means we have a line that does not end in a line_terminator. this happens when you've reached the end of a file that you are tailing and the producer of the file is flushing midway through a line.
I would imagine you need to do the following:
*My b if this format is annoying. I'm far too lazy to create pull requests and I have no idea how markdown works. 5min is about all the time I have committed to this bug report. Peace