How to set optionmenu without setting the variable
I don't believe there is any way to create
an OptionMenu without using a Tk variable.
However, if all you want to do is to
change the value of an already created OptionMenu without using the variable,
you can do this:
import Tkinter as Tk
root = Tk.Tk()
var = Tk.StringVar()
om = Tk.OptionMenu(root, var, 'a', 'b',
where index is the index of the value
you want to select. In this case, index=0 for 'a', 1 for 'b', or
2 for 'c'.
I'm not sure that's really an improvement
for you, but it works.
Also note - you can add additional options
after creation to the OptionMenu through a bit of a backdoor using a private
Tk function (so this isn't strictly recommended, I guess) using the following