示例#1
0
文件: app.py 项目: 13guff13/scripts
 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()
示例#2
0
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)