Lior Kesos wrote:
> Tried to catch a ctrl-c by -
>
> signal.signal(signal.SIGINT, mn.onQuit())
>
> where mn is an instance of
>
> class MoveNode:
> def onQuit (self, *args) :
> gtk_main_quit ()
> It isn't working and all the documentation I've been reading got me
> mixed up.
> Does gtk take care of UNIX signals and how can I access those signals
> when they pop up ?
Thanks for the bug report. I already have this one listed in bugzilla at:
http://bugzilla.gnome.org/show_bug.cgi?id=72333
The problem is that signals are processed asynchronously in python
through a "pending calls" API. If no python code gets executed in the
main thread (as is happening while the mainloop is running), then no
pending calls get made, and your unix signal handler gets delayed.
The fix is to automatically add an extra mainloop source that calls
Py_MakePendingCalls(), which should clear these pending calls. I
haven't implemented this yet though. Don't know if I will implement it
for the stable branch.
James.
_______________________________________________
pygtk mailing list [EMAIL PROTECTED]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/