我要做的是设置 if 语句来检查 checkbuttons 值是打开还是关闭
我在想的是这样的
from Tkinter import *
def checkbutton_value():
#If statement here
#is their something like
#if checkbox_1.onvalue == True:
# checkbox_2.deselect()
#if checkbox_1.varible == checkbox_1.onvalue:
# checkbox_2.deselect()
print 'Need Help on lines 7-8 or 10-11'
root=Tk()
checkbox_1 = Checkbutton(root, text='1 ', command=checkbutton_value).pack()
checkbox_2 = Checkbutton(root, text='2 ', command=checkbutton_value).pack()
checkbox_3 = Checkbutton(root, text='QUIT', command=quit).pack()
root.mainloop()