示例#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()
示例#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)
示例#3
0
 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"))
示例#4
0
文件: main.py 项目: Kwasniok/Cards
def main():
    application = Application()
    application.run()
    application.destroy()
示例#5
0
#!/usr/bin/python

import sys
from gui.application import Application

app = Application()

sys.exit(app.run())