def get_value(prompt, default=None, hidden=False):
    '''Displays the provided prompt and returns the input from the user. If the
    user hits Enter and there is a default value provided, the default is
    returned.
    '''
    _prompt = '%s : ' % prompt
    if default:
        _prompt = '%s [%s]: ' % (prompt, default)

    if hidden:
        ans = getpass(_prompt)
    else:
        ans = raw_input(_prompt)

    # If user hit Enter and there is a default value
    if not ans and default:
        ans = default
    return ans
def get_value ( prompt , default = None , hidden = False ) : _prompt = '%s : ' % prompt if default : _prompt = '%s [%s]: ' % ( prompt , default ) if hidden : ans = getpass ( _prompt ) else : ans = raw_input ( _prompt ) if not ans and default : ans = default return ans
Displays the provided prompt and returns the input from the user. If the
    user hits Enter and there is a default value provided, the default is
    returned.