GUI-programming

Laura Creighton lac at strakt.com
Thu Jan 2 04:42:41 EST 2003


> Hi,
> 
> I would like to programm my GUI, that you can start more than one
> process at the same time by e.g. clicking different buttons. 
> 
> Could anybody help me with this?
> 
> thx
> 
> Frederik

You need to explain what GUI you are using, and also what you mean by 
'more than one process at the same time'.  If what you mean is 'when
I click on each button I launch a separate program' then you are
building a launcher (and Mark Lutz, Programming Python second edition has code
that does exactly that using Tkinter which you might be interested
in.  The CD that comes with the book has the code.)

If you mean, 'while I am running my application, I want my users
to be able to interrupt things by clicking on buttons' then you need
to thread your application.  The best way to communicate between
threads is using a Queue object, and
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/82965
will show you how to do that.

Laura Creighton





More information about the Python-list mailing list