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)
def get(self, request, image_id): context = self.get_context(request, image_id) image = context.get('image') app = Application(image.image.file.name, image) return redirect(reverse("images"))
def main(): application = Application() application.run() application.destroy()
#!/usr/bin/python import sys from gui.application import Application app = Application() sys.exit(app.run())