[Tutor] 2 questions on Tkinter

cliff@ember.com cliff@ember.com
Tue, 11 Dec 2001 13:51:48 -0500


Hi List.

Q1.

In the Tkinter library, there is a method OptionMenu that takes
a variable number of strings as arguments.  These strings become
choices displayed on the menu:

OptionMenu(root, stringVar, 'First Choice', 'Second Choice')

I would like to configure an option menu based on the contents of
a list.  How do I call OptionMenu() using the strings in the list?
(The number of strings in the list is determined when the script
is run.)

Q2.

What do I have misconfigured if python can't find Tkinter?  I get an 
ImportError when I try to import Tkinter on my Linux box.

Thanks!

--Cliff