from termcolor import colored from Interpreter.Repo import Repo from Models.Interpreter.Error import Error class Utils: def __init__(self, repo: Repo) -> None: self.__repo = repo def input(self, prefix: str) -> str: return input(prefix) def output(self, text: str) -> None: print(f'-> {text}') def error(self, error: Error) -> None: self.__repo.error = error print(colored(f'{self.__repo.error.code}: {self.__repo.error.msg}', 'red'))