MCPcopy Create free account
hub / github.com/MorvanZhou/tutorials / print_selection

Function print_selection

tkinterTUT/tk7_checkbutton.py:15–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13l.pack()
14
15def print_selection():
16 if (var1.get() == 1) & (var2.get() == 0):
17 l.config(text='I love only Python ')
18 elif (var1.get() == 0) & (var2.get() == 1):
19 l.config(text='I love only C++')
20 elif (var1.get() == 0) & (var2.get() == 0):
21 l.config(text='I do not love either')
22 else:
23 l.config(text='I love both')
24
25var1 = tk.IntVar()
26var2 = tk.IntVar()

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected