

def getchars(self, region=None, gapChar=' '):
    '\n        Returns the a list of the characters in the specified region. Each item in the list is a string of the rows of characters.\n\n        - gapChar is used whenever None is found as a cell. By default this is set to a space character. If gapChar is set to None, then the None characters in cells will be ignored (this could cause alignment issues in between the lines.)\n        '
    (x, y, width, height) = self.getregion(region)
    if ((x, y, width, height) == (None, None, None, None)):
        return
    lines = []
    for iy in range(y, (y + height)):
        line = []
        for ix in range(x, (x + width)):
            if ((self._screenchar[ix][iy] is None) and (gapChar is not None)):
                line.append(gapChar)
            else:
                line.append(self._screenchar[ix][iy])
        lines.append(''.join(line))
    return self

dataset/ETHPy150Open asweigart/pygcurse/pygcurse/__init__.py PygcurseSurface.getchars/VarMisuse@176/349 `lines`->`self`