Example #1
0
                      line_style, file_path)
        image = Image.open(".temp/generated_plot.png").resize(
            (canvas.winfo_width(), canvas.winfo_height()))
        gif1 = ImageTk.PhotoImage(image, Image.ANTIALIAS)
        canvas.create_image(0, 0, image=gif1, anchor=NW)
        canvas.gif1 = gif1
        plotted = True
    else:
        canvas.delete(ALL)

    sys.stdout.flush()


def init(top, gui, *args, **kwargs):
    global w, top_level, root
    w = gui
    top_level = top
    root = top


def destroy_window():
    # Function which closes the window.
    global top_level
    top_level.destroy()
    top_level = None


if __name__ == "__main__":
    import gui_main
    gui_main.vp_start_gui()
Example #2
0
import sys
from client_api import FlashcardsClientAPI
from gui_main import vp_start_gui

__author__ = 'pgenssler'

if __name__ == '__main__':
    if len(sys.argv) != 3:
        print('usage: {0} <host> <port>'.format(sys.argv[0]))
        exit(1)

    api = FlashcardsClientAPI(sys.argv[1], sys.argv[2])

    vp_start_gui(api)