Newbie Radiobutton question

Rick Olson r_olson at sandiego.edu
Tue Jul 3 23:01:20 EDT 2001


Hi--

I'm trying to run the following from IDLE:



from Tkinter import *



root=Tk()



x=IntVar()

x.set(2)

Radiobutton(root, text='a',value=1,variable=x).pack(anchor=W)

Radiobutton(root, text='b',value=2,variable=x).pack(anchor=W)



With Red Hat Linux (Python 1.5.2, IDLE .4) it runs fine the first
time.  I get the window and the second radio button is selected.  If I
close the window and try to run it again by immediately clicking on F5
the window and buttons appear, but nothing is selected.  If I click on
the buttons they work properly.  Even closing the window with the
program, reopening the file and running won't cause the buttons to be
selected.  I need to close IDLE, and restart it.



With Win2K (Python 1.6.1, IDLE .6) it runs every time.



I'm a linux neophyte, but will figure out how to upgrade whatever is
necessary.  Is this a Python problem, and IDLE problem, a Red Hat
problem or a user problem?   Is there anything else that I am likely
to need to change (e.g. tcl installation)?


Thanks in advance--

Rick Olson



More information about the Python-list mailing list