> In fact, reducing timeout() to
> 
>     def timeout():
>         return True

Seems sane. If you look in the gtkmodule.c, to see what we're doing to
make the interpretor breath:

python_do_pending_calls(gpointer data)
{
    gboolean quit = FALSE;

    pyg_block_threads();
    if (PyErr_CheckSignals() == -1) {
        PyErr_SetNone(PyExc_KeyboardInterrupt);
        quit = TRUE;
    }
    pyg_unblock_threads();
 
    if (quit && gtk_main_level() > 0)
        gtk_main_quit();
     
    return TRUE;
}

Basically it's just a call to PyErr_CheckSignals(). The rest is there to
make sure we're not quitting when there are no mainloops available and
make sure that threads work correctly.
-- 
Johan Dahlin <[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