def tail(self, lines=<NUM_LIT:10>):
self.file.seek(<NUM_LIT:0>, SEEK_END)<EOL>for i in range(lines):<EOL><INDENT>if self.seek_previous_line() == -<NUM_LIT:1>:<EOL><INDENT>break<EOL><DEDENT><DEDENT>data = self.file.read()<EOL>for t in self.LINE_TERMINATORS:<EOL><INDENT>if data.endswith(t):<EOL><INDENT>data = data[:-len(t)]<EOL>break<EOL><DEDENT><DEDENT>if data:<EOL><INDENT>return self.splitlines(data)<EOL><DEDENT>else:<EOL><INDENT>return []<EOL><DEDENT>
Return the last lines of the file.