def __init__(self): self.lesson = None self.practice = None self.cfg = config.Config() self.cfg.create_default_user_config() self.factory = OperationFactory() MainWindow.__init__(self, self.factory) self.new_lesson() self.mainloop()
def run_exclusive(): from config import Config cfg = Config() cfg.reload() from dictionary import Dict dictionary = Dict(cfg) dictionary.reload_dict(cfg["path_to_dict"]) dictionary.reload_stat(cfg["path_to_stat"]) from oper_factory import OperationFactory factory = OperationFactory() factory.create(dictionary, cfg) tk = Tk() tk.withdraw() factory.get_operation("ShowStatistic").execute(tk)