code: def _run_notty(self, writer):
          
          page_idx = page_offset = 0
          while True:
              npage_idx, _ = self.draw(writer, page_idx + 1, page_offset)
              if npage_idx == self.last_page:
                  # page displayed was last page, quit.
                  break
              page_idx = npage_idx
              self.dirty = self.STATE_DIRTY
          return
docs: Pager run method for terminals that are not a tty.