'This is called when user enters anything.'

def func(self):

    caller = self.caller
    try:
        getinput = caller.ndb._getinput
        if ((not getinput) and hasattr(caller, 'player')):
            getinput = caller.player.ndb._getinput
            caller = caller.player
        callback = getinput._callback
        caller.ndb._getinput._session = self.session
        prompt = caller.ndb._getinput._prompt
        args = caller.ndb._getinput._args
        kwargs = caller.ndb._getinput._kwargs
        result = self.raw_string.strip()
        ok = (not callback(caller, prompt, result, *args, **kwargs))
        if ok:
            del caller.ndb._getinput
            caller.cmdset.remove(InputCmdSet)
    except Exception:
        caller.msg('|rError    in    get_input.    Choice    not    confirmed    (report    to    admin)|n')
        logger.log_trace('Error    in    get_input')
        caller.cmdset.remove(InputCmdSet)
