Beispiel #1
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)
Beispiel #2
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()
Beispiel #3
0
def main():
    application = Application()
    application.run()
    application.destroy()
Beispiel #4
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"))
Beispiel #5
0
from gui.constant import *
from gui.menu import *
from gui.navigatebar import *
from gui.statusbar import *
from gui.categorybar import *
from gui.scrolledWindow import *
from gui.box import *
from gui.button import *
from gui.listview import *
from gui.tooltip import *
from gui.popupWindow import *
from gui.ompButton import *

if __name__ == "__main__":
    # Init application.
    application = Application()
    
    # Set application default size.
    application.set_default_size(DEFAULT_WINDOW_WIDTH, DEFAULT_WINDOW_HEIGHT)
    
    # Set application icon.
    application.set_icon("icon.ico")
    
    # Draw application background.
    application.set_background(BACKGROUND_IMAGE)
    button = gtk.Button()
    button.set_size_request(200,300)
    # Init menu callback.
    menu = Menu(
        [("menu/menuItem1.png", "测试测试测试1", lambda :PopupWindow(application.window)),
         ("menu/menuItem2.png", "测试测试测试2", None),
Beispiel #6
0
__author__ = 'kpasech'

from gui.application import Application

if __name__ == "__main__":
    app = Application()
    app.run()
Beispiel #7
0
#!/usr/bin/python

import sys
from gui.application import Application

app = Application()

sys.exit(app.run())