def warning(self, message): """ Add the message if the level is warning or less. """ LEVEL_NUMBER = 2 PREPEND(2) self._write(message, LEVEL_NUMBER)
def info(self, message): """ Add the message if the level is info or less. """ LEVEL_NUMBER = 1 PREPEND(1) self._write(message, LEVEL_NUMBER)
def debug(self, message): """ Add the message if the level is debug. """ LEVEL_NUMBER = 0 PREPEND(1) self._write(message, LEVEL_NUMBER)
def error(self, message): """ Add the message if the level is error or less. """ LEVEL_NUMBER = 3 PREPEND(2) self._write(message, LEVEL_NUMBER)
def critical(self, message): """ Add the message if the level is critical or less. """ LEVEL_NUMBER = 4 PREPEND(2) self._write(message, LEVEL_NUMBER) exit()
def main(SONG_NAME=''): """Run on program call.""" cache = Cache() match = cache.search(SONG_NAME) if match: PREPEND(1) print(Fore.MAGENTA, end='') print('{} '.format(SONG_NAME), end='') print(Style.RESET_ALL, end='') print('found.') while True: choice = input('Do you still want to continue[y/n]') choice = choice.lower() if choice == 'y' or choice == 'Y': return True elif choice == 'n' or choice == 'N': return False else: return True