def prompt(prompt):
    """Ask for some value, keep asking until an answer is given
    (whitespace is stripped).

    """
    while True:
        try:
            ret = input(prompt)
        except KeyboardInterrupt:
            print()
            return ''
        else:
            if ret.strip():
                break
    return ret
