[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Gui




On Sun, 26 Jun 2005, andrew baker wrote:

> I've used Tkinter, and I didn't like it very much.  If you call it from
> within a normal loop, you have to wait for it to finish execution before
> it returns to the main loop.  That's a wee bit annoying.  There are ways
> around that, but it's basically obnoxious.


Hi Andrew,


Do you know about the update and update_idletasks() methods?  mainloop()
goes in an infinite event-handling loop, but update_idletasks() should
exit out as soon as all pending idle tasks are done.

http://www.pythonware.com/library/tkinter/introduction/x9374-event-processing.htm


Twisted Python, for example, did something like this to integrate the
Tkinter system within its own event looping system:

    http://baypiggies.net/pipermail/baypiggies/2004-August/000507.html

so it should be relatively straightforward to take that approach in PyGame
too.


Best of wishes!