def prompt_choices(name, choices, default=None, 
    resolve=string.lower, no_choice=('none',)):
    
    _choices = []
    options = []
    
    for choice in choices:
        if isinstance(choice, basestring):
            options.append(choice)
        else:
            options.append("%s [%s]" % (choice[1], choice[0]))
            choice = choice[0]
        _choices.append(choice)

    while True:
        rv = prompt(name + '? - (%s)' % ', '.join(options), default)
        if not rv:
            return default
        rv = resolve(rv)
        if rv in no_choice:
            return None
        if rv in _choices:
            return rv
Collect all the sys.doc output from each minion and return the aggregate
dataset/ETHPy150Open danjac/Flask-Script/flaskext/script.py/prompt_choices--crossover with--dataset/ETHPy150Open saltstack/salt/salt/runners/doc.py/execution