[pygtk] button not responding

Brian dol-sen at telus.net
Fri Oct 28 13:08:26 WST 2005

On Fri, 2005-28-10 at 10:37 +1000, vector wrote:
> Hi
> I feel a little embarrased and silly asking this and not sure how to say 
> it but here goes.
> Newbie,, be nice
> I have a window with two buttons in it (actually its a lot more than 
> that but i dont think thats important)
> one button starts the system doing some calcs. the other button can be 
> used to terminate.
> Its acting as if once i hit the first button python is not interested in 
> anything until its finished. ie the second button is not processed until 
> its finished button 1s task..
> I thought (ohh dear) that a gtk widget, like the second button would 
> interrupt the previous process.
> I think im being naive ?

pygtk/gtk+ like most everything can only do one thing at a time.  If you
have a long slow calculation task to do it is usually better to do that
in a thread so that it does not tie up the gui interface.  There are
several methods for dealing with that.  In fact someone just yesterday
posted to this list that he just made a tutorial for working with

Here is his tutorial link:

Check the archives and you will find plenty of questions/answers about
threads and doing larger computations and working with the gui

Brian <dol-sen at telus.net>

More information about the pygtk mailing list