Simple helper function

def input_yes_no(msg=''):
    """
    Simple helper function
    """
    print '\n'+msg
    while(True):
        i=raw_input('Input yes or no: ')
        i=i.lower()
        if i=='y' or i=='yes':
            return True
        elif i=='n' or i=='no':
            return False
        else:
            print 'ERROR: Bad input. Must enter y/n/yes/no'