Next / Previous / Contents / Shipman's homepage

20.12. InputFile.__anyNonblank(): Does this column contain any nonblank lines?

listext2
# - - -   I n p u t F i l e . _ _ a n y N o n b l a n k

    def __anyNonblank(self, fromx, tox):
        '''Are there any nonblank lines in this column?

          [ 0 <= fromx < tox <= len(self.__blockList) ->
              if any line in self.__blockList[fromx:tox] is nonblank ->
                return True
              else -> return False ]
        '''
        #-- 1
        for blox in range(fromx, tox):
            if not self.__blockList[blox].isBlank:
                return True

        #-- 2
        return False