Example #1
0
File: app.py Project: myth/coroner
    def __init__(self):
        self.app = Application()
        self.ctrl = Controller()

        LOG.debug("Setting up routes")

        self.app.add_routes(self.ctrl.routes)
        self.app.router.add_static("/static/", path=join(dirname(abspath(__file__)), "public/static/"), name="static")
        self.app.on_startup.append(self.on_startup)
        self.app.cleanup_ctx.append(self.ctrl.collector.persistent_session)
        self.app.on_shutdown.append(self.on_shutdown)

        LOG.debug("Coroner initialized")
Example #2
0
from ui import UI
from ctrl import Controller
from state import State
from prb import Problem

    
if __name__ == '__main__':
    f = open("board.txt", "r")
    size = int(f.readline())
    state = State(size)
    prb = Problem(state)
    ctrl = Controller(prb)
    main = UI(ctrl)
    main.runConsole()