2020-01-08 13:12:15 +00:00
|
|
|
import tkinter as tk
|
|
|
|
|
|
|
|
w = tk.Tk()
|
|
|
|
|
2020-01-15 20:19:23 +00:00
|
|
|
p_nameVar = tk.StringVar(w)
|
|
|
|
cpusVar = tk.StringVar(w)
|
|
|
|
cycVar = tk.StringVar(w)
|
|
|
|
N_tsVar = tk.StringVar(w)
|
|
|
|
T_cycVar = tk.StringVar(w)
|
|
|
|
settings = 0
|
|
|
|
def getvars():
|
|
|
|
p_name = p_nameVar.get()
|
|
|
|
cpus = cpusVar.get()
|
|
|
|
cyc = cycVar.get()
|
|
|
|
N_ts = N_tsVar.get()
|
|
|
|
T_cyc = T_cycVar.get()
|
|
|
|
settings = (p_name, cpus, cyc, N_ts, T_cyc)
|
|
|
|
print(settings)
|
2020-01-08 13:12:15 +00:00
|
|
|
|
|
|
|
field1 = tk.Label(w, text="project name").grid(row=0, column=0)
|
2020-01-15 20:19:23 +00:00
|
|
|
entry1 = tk.Entry(w, textvariable = p_nameVar).grid(row=0, column=1)
|
2020-01-08 13:12:15 +00:00
|
|
|
|
|
|
|
field2 = tk.Label(w, text="CPUs").grid(row=1, column=0)
|
2020-01-15 20:19:23 +00:00
|
|
|
entry2 = tk.Entry(w, textvariable = cpusVar).grid(row=1, column=1)
|
2020-01-08 13:12:15 +00:00
|
|
|
|
|
|
|
field3 = tk.Label(w, text="number of cycles").grid(row=2, column=0)
|
2020-01-15 20:19:23 +00:00
|
|
|
entry3 = tk.Entry(w, textvariable = cycVar).grid(row=2, column=1)
|
2020-01-08 13:12:15 +00:00
|
|
|
|
|
|
|
field4 = tk.Label(w, text="number of time steps").grid(row=3, column=0)
|
2020-01-15 20:19:23 +00:00
|
|
|
entry4 = tk.Entry(w, textvariable = N_tsVar).grid(row=3, column=1)
|
2020-01-08 13:12:15 +00:00
|
|
|
|
|
|
|
field5 = tk.Label(w, text="cycle periode").grid(row=4, column=0)
|
2020-01-15 20:19:23 +00:00
|
|
|
entry5 = tk.Entry(w, textvariable = T_cycVar).grid(row=4, column=1)
|
2020-01-08 13:12:15 +00:00
|
|
|
|
2020-01-15 20:19:23 +00:00
|
|
|
button = tk.Button(w, text="Get vars", command=getvars).grid(row=5)
|
2020-01-08 13:12:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
w.mainloop()
|