def _replace_prompt(path):
    """Return True if the user wants to replace the file."""
    while True:
        result = input("{} already exists. Replace? [yN] ".format(path))
        result = result.lower()
        if result in ('y', 'yes'):
            return True
        elif result in ('n', 'no', ''):
            return False
        else:
            print("Invalid answer. Please answer 'yes' or 'no'.")