Ejemplo n.º 1
0
def main():

    # Redirect stdout/stderr to file
    with open("./data/run.log", "a+") as log_fh:
        #sys.stdout = log_fh
        #sys.stderr = log_fh
        now = time.strftime("%Y-%m-%d %H:%M:%S", time.gmtime())
        seper = "-" * 19
        print("\n\n%s\n%s\n%s\n" % (seper, now, seper))

        # Create the GUI application and the brain core.
        app = Application()
        core = Core()

        # Ensure the app and core have a handle of each other.
        app.set_core(core)
        core.set_gui(app)

        # Start the brain core running.
        core.start()

        #core.initialise_gui()

        # Run the application.
        app.mainloop()
Ejemplo n.º 2
0
def life_generator(data_file, filter_file):
    if not filter_file:
        # Start the GUI implementation
        root = tk.Tk()
        app = Application(data_file, root)
        app.mainloop()
    else:
        # Star the CLI implementation
        application(data_file, filter_file)