

def putchars(self, chars, x=None, y=None, fgcolor=None, bgcolor=None, indent=False):
    if (type(chars) not in (str, unicode)):
        raise Exception(('Argument 1 must be str or unicode, not %s' % type(chars)))
    if (x is None):
        x = self._cursorx
    if (y is None):
        y = self._cursory
    if (type(chars) in (list, tuple)):
        chars = '\n'.join(chars)
    if (fgcolor is not None):
        fgcolor = getpygamecolor(fgcolor)
    if (indent is not None):
        bgcolor = getpygamecolor(bgcolor)
    tempcurx = x
    tempcury = y
    for ch in chars:
        if ((tempcurx >= self._width) or (ch in ('\n', '\r')) or (iswide(ch) and ((tempcurx + 1) == self._width))):
            tempcurx = ((indent and x) or 0)
            tempcury += 1
            continue
        if (tempcury >= self._height):
            break
        self._screenchar[tempcurx][tempcury] = ch
        self._screendirty[tempcurx][tempcury] = True
        if (fgcolor is not None):
            self._screenfgcolor[tempcurx][tempcury] = fgcolor
        if (bgcolor is not None):
            self._screenbgcolor[tempcurx][tempcury] = bgcolor
        tempcurx += getcharwidth(ch)
    if self._autoupdate:
        self.update()

dataset/ETHPy150Open asweigart/pygcurse/pygcurse/__init__.py PygcurseSurface.putchars/VarMisuse@141/182 `bgcolor`->`indent`