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()
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)