Christopher Arndt wrote:
> From the Standard Library Documentation:
>
> "Although Python signal handlers are called asynchronously as far as the
> Python user is concerned, they can only occur between the ``atomic''
> instructions of the Python interpreter. This means that signals arriving
> during long calculations implemented purely in C (e.g. regular
> expression matches on large bodies of text) may be delayed for an
> arbitrary amount of time."
>
> gtk.mainloop() is such a C "calculation". This means the signal handler
> is called after gtk.mainloop() exits (which is too late).
>
> Anyway, you got the signal.signal() call wrong. The second arg is a
> function *object* not a function *call* (i.e. leave out the braces).
> But unfortunately, as explained above, this will not work in the desired
> way either.
>
It's hard for me to believe that the gtk folks haven't thought of
solution for this - maybe gtk handeling keyboard interrupts.
Anyway I thought about a different approach - I understand that I can
set different key combinations as accelerators that do specific actions
can't I just map ctrl-c to do activate my gtk_main_quit() ?
--
Lior Kesos , [EMAIL PROTECTED]
Aduva re.search("meaning",self)
============================
KISS - Keep It Simple Stupid.
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/