On 14 May 2010 19:48, Neil Benn <neil.b...@ziath.com> wrote: > This starts up as you would expect, printing a and b to the screen as the > threading time time slicing allows. However once the PyGTK window has opened > - these threads just freeze.
To use threads, you need to enable pygtk's support for threads by calling gtk.gdk.threads_init(). http://unpythonic.blogspot.com/2007/08/using-threads-in-pygtk.html is a good brief overview of how to use pygtk and threads. It's also worthwhile reading the gtk+ notes on threading at http://developer.gimp.org/api/2.0/gdk/gdk-Threads.html , especially if you're trying to write something portable between X11 and Windows. I would, however, recommend looking at alternative options, such as multiprocessing, carefully first, before committing yourself to a threaded solution. -- Neil Muller drnlmul...@gmail.com I've got a gmail account. Why haven't I become cool? _______________________________________________ pygtk mailing list pygtk@daa.com.au http://www.daa.com.au/mailman/listinfo/pygtk Read the PyGTK FAQ: http://faq.pygtk.org/