James Henstridge <[EMAIL PROTECTED]> writes:

> Damien Elmes wrote:
> 
> >
> >Sure you can. But the C-c has to be directed at your app, not the terminal it's
> >running in. I run GTK in my own main loop, calling mainiteration(), which also
> >solves this problem.
> >
> Doing so will most likely slow your app down incredibly (or at least increase
> its CPU usage if you machine is fast).  Calling into python code during every
> iteration of the main loop is going to slow it down.

Unfortunately there's not much of an alternative in an application which uses
pluggable interfaces. The GTK timeout and watch handling stuff is neat, but
there's no point bringing a dependency on GTK if a person decides to run, say,
a curses interface instead.

Another alternative would be to run the gtk mainloop in another thread. But
threading isn't fun - especially in python.

For the record, the slowdown isn't terribly noticable :-)

-- 
Damien Elmes
[EMAIL PROTECTED]
_______________________________________________
pygtk mailing list   [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to