

def getkey(self, *args):
    if (len(args) == 0):
        val = lib.wgetch(val._win)
    elif (len(args) == 2):
        val = lib.mvwgetch(self._win, *args)
    else:
        raise error('getkey requires 0 or 2 arguments')
    if (val == lib.ERR):
        raise error('no input')
    elif (val <= 255):
        return chr(val)
    else:
        val = lib.keyname(val)
        if (val == ffi.NULL):
            return ''
        return ffi.string(val)

dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/cffi-1.5.2/demo/_curses.py Window.getkey/VarMisuse@31/35 `self`->`val`