Revision d3988d51e01940007595761dab6b846ce2506433 authored by boyongpark on 11 March 2021, 01:38:19 UTC, committed by GitHub on 11 March 2021, 01:38:19 UTC
1 parent 46655f5
Raw File
eval.py
# -*- coding: utf-8 -*-

import tkinter as tk
import os

path = os.path.realpath(__file__)
path = os.path.dirname(path)

class TaskGUI:
    def __init__(self,master):
        # Initialize
        self.master=master
        master.title(':P')

        self.ENG_Path = os.path.join(path, 'Evaluator.py')
        self.FR_path = os.path.join(path, 'Evaluator_fr.py')

        # English
        self.ENG_Button = tk.Button(master, text = 'English', command = lambda: self.startTask(self.ENG_Path))
        # French
        self.FR_Button = tk.Button(master, text = "Français", command = lambda: self.startTask(self.FR_Path))

        # Pack buttons
        self.ENG_Button.pack(side = 'left')
        self.FR_Button.pack(side = 'left')

    def startTask(self,path):
        os.system("python " + path)

root = tk.Tk()
GUI = TaskGUI(root)
root.mainloop()
back to top