def findFrameLastLine(self, frame):
        """ For the given frame, figure out the last non-blank line, return
            that # + 1 (aka, last used line of the frame) """
        # start at the last line, work up until we find a character.
        for lineNum in reversed(list(range(0, self.mov.sizeY))):
            #for colNum in range(0, frame.sizeX):
            for colNum in range(0, len(frame.content[lineNum])):
                if not frame.content[lineNum][colNum] in [' ', '']:
                    return lineNum + 1  # we found a non-empty character
        return 1 # blank frame, only save the first line.
 For the given frame, figure out the last non-blank line, return
            that # + 1 (aka, last used line of the frame) 
durdraw/durdraw_ui_curses.py