def prompt(msg, default=NO_DEFAULT, validate=None):
    while True:
        response = raw_input(msg + ' ').strip()
        if not response:
            if default is NO_DEFAULT:
                continue
            return default
        if validate is None or validate(response):
            return response
Prompt user for input
dataset/ETHPy150Open mathcamp/pypicloud/pypicloud/scripts.py/prompt