

def setupterm(term=None, fd=(- 1)):
    if (fd == (- 1)):
        fd = sys.stdout.fileno()
    if _initialised_setupterm:
        return None
    if (term is None):
        term = ffi.NULL
    err = ffi.new('int *')
    if (lib.setupterm(err, fd, err) == lib.ERR):
        err = err[0]
        if (err == 0):
            raise error('setupterm: could not find terminal')
        elif (err == (- 1)):
            raise error('setupterm: could not find terminfo database')
        else:
            raise error('setupterm: unknown error')
    globals()['_initialised_setupterm'] = True
    return None

dataset/ETHPy150Open cloudera/hue/desktop/core/ext-py/cffi-1.5.2/demo/_curses.py setupterm/VarMisuse@82/95 `term`->`err`