2009/8/7 Guilherme Polo <ggp...@gmail.com>: > 2009/8/7 boivie <boi...@hotmail.com>: ... > > import Tkinter > > def test(option): > print option > > things = ['a', 'b', 'c', 'd'] > > root = Tkinter.Tk() > > for indx, option in enumerate(things):
You don't need indx neither enumerate here (same for the gtk code). I was going to use grid like you did, but in the end the pasted code didn't use. I hope this doesn't compromise understanding the problem described. > cmd = lambda opt=option: test(opt) > btn = Tkinter.Button(text=option, command=cmd) > btn.pack(side='left') > > root.mainloop() -- -- Guilherme H. Polo Goncalves _______________________________________________ Tkinter-discuss mailing list Tkinter-discuss@python.org http://mail.python.org/mailman/listinfo/tkinter-discuss