Esempio n. 1
0
    def __init__(self):

        self.core = Core()
        self.gui = GuiController()

        self.core.set_gui(self.gui)
        self.gui.set_core(self.core)
        self.gui.activate("closed")
        self.logger = logging.Logger(self.__class__.__name__)
        self.logger.setLevel(defaultLoggingLevel)
        self.logger.addHandler(defaultLoggingHandler)
Esempio n. 2
0
    def __init__(self):

        self.core = Core()
        self.gui = GuiController()

        self.core.set_gui(self.gui)
        self.gui.set_core(self.core)
        self.gui.activate("closed")
        self.logger = logging.Logger(self.__class__.__name__)
        self.logger.setLevel(defaultLoggingLevel)
        self.logger.addHandler(defaultLoggingHandler)
Esempio n. 3
0
class Perroquet(object):
    def __init__(self):

        self.core = Core()
        self.gui = GuiController()

        self.core.set_gui(self.gui)
        self.gui.set_core(self.core)
        self.gui.activate("closed")
        self.logger = logging.Logger(self.__class__.__name__)
        self.logger.setLevel(defaultLoggingLevel)
        self.logger.addHandler(defaultLoggingHandler)

    def run(self):
        if len(sys.argv) > 1:
            path = os.path.abspath(sys.argv[1])
            self.core.load_exercise(path)
        elif config.get("lastopenfile"):
            self.logger.info("last open file : " + config.get("lastopenfile"))
            self.core.load_exercise(config.get("lastopenfile"))

        self.gui.run()
Esempio n. 4
0
class Perroquet(object):

    def __init__(self):

        self.core = Core()
        self.gui = GuiController()

        self.core.set_gui(self.gui)
        self.gui.set_core(self.core)
        self.gui.activate("closed")
        self.logger = logging.Logger(self.__class__.__name__)
        self.logger.setLevel(defaultLoggingLevel)
        self.logger.addHandler(defaultLoggingHandler)

    def run(self):
        if len(sys.argv) > 1:
            path = os.path.abspath(sys.argv[1])
            self.core.load_exercise(path)
        elif config.get("lastopenfile"):
            self.logger.info("last open file : " + config.get("lastopenfile"))
            self.core.load_exercise(config.get("lastopenfile"))

        self.gui.run()