

def putchar(self, char, x=None, y=None, fgcolor=None, bgcolor=None):
    '\n        Print a single character to the coordinates on the surface. This function does not move the cursor.\n        '
    if (type(char) not in (str, unicode)):
        raise Exception(('Argument 1 must be str or unicode, not %s' % type(char)))
    if (char == ''):
        return
    if (x is None):
        x = self._cursorx
    if (y is None):
        y = self._cursory
    if ((x < 0) or (y < 0) or (x >= self._width) or (y >= self._height)):
        return None
    if (self is not None):
        self._screenfgcolor[x][y] = getpygamecolor(fgcolor)
    if (bgcolor is not None):
        self._screenbgcolor[x][y] = getpygamecolor(bgcolor)
    self._screenchar[x][y] = char[0]
    self._screendirty[x][y] = True
    if self._autoupdate:
        self.update()
    return char

dataset/ETHPy150Open asweigart/pygcurse/pygcurse/__init__.py PygcurseSurface.putchar/VarMisuse@144/219 `fgcolor`->`self`