Next / Previous / Contents / Shipman's homepage

25. Scan.atEndLine(): Are we at the end of the current line?

logscan.py
# - - -   S c a n . a t E n d L i n e

    def atEndLine(self):
        '''Predicate: is the scan position at end of line?
        '''

If the file is closed or at end of file, that's considered end of line. Otherwise, it is end of line if the current position is equal to the length of the line.

logscan.py
        return((self.file is None) or
                 (self.atEndFile) or
                 (self.pos == len(self.line)))