[Tutor] command in menu and button
Double Six
doublesix at ureach.com
Tue Nov 22 22:40:11 CET 2005
Hi all,
I'm puzzled by the 'command' option in menu and Button of
Tkinter. With the following lines,
menu.add_command(label="Open Viewer", command=os.system("Open my
viewer &"))
Button(toolbar, text='Open Viewer', command=os.system("Open my
viewer &")).pack(side=LEFT)
I wanted to open a graphical viewer from the prompt (that is why
I used os.system("Open viewer &")) once the user selects the
option from the menu, or clicks the button, but this gets
implements whenever the GUI is launched instead. Why is this?
And how can I make it work?
Many thanks,
Joe
________________________________________________
Get your own "800" number
Voicemail, fax, email, and a lot more
http://www.ureach.com/reg/tag
More information about the Tutor
mailing list