def prompt_for_yes_no(msg):
    """returns a bool based on whether the user presses y/n."""
    choice = None
    while not choice or choice.lower() not in ['y', 'n', 'yes', 'no']:
        choice = input('%s (y/n) ' % msg).lower()
    return choice.lower() in ['y', 'yes']