The menu operations in python tkinter are mentioned in the previous blog.
Python development _ tkinter _ multi-level sub-menu
The following operations are performed on tkinter to obtain the single-choice menu value.
'Print party and flavor'Obtain the value of the single-choice menu
========================================================== ============================
Code Section:
========================================================== ============================
tkinter * = { : : : : : Radiobutton_button = Menubutton(mBar, text= underline= Radiobutton_button.pack(side=LEFT, padx= Radiobutton_button.menu = Radiobutton_button.menu.add_radiobutton(label= variable=var, value=1 Radiobutton_button.menu.add(, {: : 2 Radiobutton_button.menu.add(, {: : 3 var.set(2 Radiobutton_button[] = Radiobutton_button = Menubutton(mBar, text= underline= Radiobutton_button.pack(side=LEFT, padx= Radiobutton_button.menu = Radiobutton_button.menu.add_radiobutton(label= variable=var, value= Radiobutton_button.menu.add_radiobutton(label= variable=var, value= Radiobutton_button.menu.add_radiobutton(label= variable=var, value= var.set( Radiobutton_button[] = ( ( root = mBar = Frame(root, relief=RAISED, borderwidth=2 mBar.pack(fill= party = flavor = Radiobutton_button = Radiobutton_button2 = b = Button(root, text=, foreground= command= b.pack(side= root.title( root.iconname( root.mainloop()
References:
Http://www.oschina.net/code/explore/Python-3.1.3/Demo/tkinter/matt/two-radio-groups.py