def get_answer(message, answers='Yn', default='Y', quit=''):
    if quit and quit not in answers:
        answers = answers + quit
        
    message = message + '(' + '/'.join(answers) + ')[' + default + ']:'
    ans = raw_input(message).strip().upper()
    if default and not ans:
        ans = default.upper()
    while ans not in answers.upper():
        ans = raw_input(message).strip().upper()
    if quit and ans == quit.upper():
        print "Command be cancelled!"
        sys.exit(0)
    return ans
Writes a metric that will be added to the search inspector.
dataset/ETHPy150Open limodou/uliweb/uliweb/core/commands.py/get_answer--crossover with--dataset/ETHPy150Open splunk/splunk-sdk-python/splunklib/searchcommands/search_command.py/SearchCommand.write_metric