def prompt(msg, default=NO_DEFAULT, validate=None):
while True:<EOL><INDENT>response = input(msg + "<STR_LIT:U+0020>").strip()<EOL>if not response:<EOL><INDENT>if default is NO_DEFAULT:<EOL><INDENT>continue<EOL><DEDENT>return default<EOL><DEDENT>if validate is None or validate(response):<EOL><INDENT>return response<EOL><DEDENT><DEDENT>
Prompt user for input