Compare commits
2 Commits
05bad3c7b2
...
1b8ce63673
Author | SHA1 | Date | |
---|---|---|---|
1b8ce63673 | |||
64e7f83caf |
24
test_gui.py
24
test_gui.py
|
@ -7,14 +7,21 @@ cpusVar = tk.StringVar(w)
|
|||
cycVar = tk.StringVar(w)
|
||||
N_tsVar = tk.StringVar(w)
|
||||
T_cycVar = tk.StringVar(w)
|
||||
settings = 0
|
||||
settings={
|
||||
'p_name': 'default',
|
||||
'cpus': 0,
|
||||
'cyc': 0,
|
||||
'N_ts': 0,
|
||||
'T_cyc': 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)
|
||||
global settings
|
||||
settings['p_name'] = p_nameVar.get()
|
||||
settings['cpus'] = cpusVar.get()
|
||||
settings['cyc'] = cycVar.get()
|
||||
settings['N_ts'] = N_tsVar.get()
|
||||
settings['T_cyc'] = T_cycVar.get()
|
||||
print(settings)
|
||||
|
||||
field1 = tk.Label(w, text="project name").grid(row=0, column=0)
|
||||
|
@ -36,3 +43,6 @@ button = tk.Button(w, text="Get vars", command=getvars).grid(row=5)
|
|||
|
||||
|
||||
w.mainloop()
|
||||
|
||||
print(settings)
|
||||
print(settings['cpus'])
|
||||
|
|
Loading…
Reference in New Issue
Block a user