Next / Previous / Contents / Shipman's homepage

25. Scan.atEndLine(): Are we at the end of the current line?
# - - -   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.
        return((self.file is None) or
                 (self.atEndFile) or
                 (self.pos == len(self.line)))