[Tutor] embarrassingly basic Tkinter question...

Alan Gauld alan.gauld at blueyonder.co.uk
Mon Jun 28 13:43:14 EDT 2004

> I've been through all of the documentation I can get my hands on,
and I
> have yet to find a clear answer-- can anyone tell me a good way to
> launch an application (under Linux) by clicking on a button created
> Tkinter?

You need to set the command parameter of the Button widget to a Python
function and make the Python function call an external program via

> Basically, I want to create a simple menu application for my wife
> been lost on this machine since I switched to Xfce4)

Why not just give her a login using her preferred windowmanager? Thats
what multi user operating systems are for - each user gets the
environment they prefer!

> but I like to keep it relatively clean. Besides, there's a problem
> needs solving, and I'd love to be able to do it myself, the way I

The command parameter is your friend.

Check my GUI topic on my tutorial which shows very simple use
of Buttons and the command parameter.

Alan G
Author of the Learn to Program web tutor

More information about the Tutor mailing list