def follow(self, delay=<NUM_LIT:1.0>):
trailing = True<EOL>while <NUM_LIT:1>:<EOL><INDENT>where = self.file.tell()<EOL>line = self.file.readline()<EOL>if line:<EOL><INDENT>if trailing and line in self.line_terminators:<EOL><INDENT>trailing = False<EOL>continue<EOL><DEDENT>if line[-<NUM_LIT:1>] in self.line_terminators:<EOL><INDENT>line = line[:-<NUM_LIT:1>]<EOL>if line[-<NUM_LIT:1>:] == '<STR_LIT:\r\n>' and '<STR_LIT:\r\n>' in self.line_terminators:<EOL><INDENT>line = line[:-<NUM_LIT:1>]<EOL><DEDENT><DEDENT>trailing = False<EOL>yield line<EOL><DEDENT>else:<EOL><INDENT>trailing = True<EOL>self.seek(where)<EOL>time.sleep(delay)<EOL><DEDENT><DEDENT>
\
        Iterator generator that returns lines as data is added to the file.

        Based on: http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/157035