the quit_flag and call_quit_handlers() were pseudo code (I should probably
have made that more clear).  The quit_flag is actually a static variable
in gtkmain.c and the call_quit_handlers() is actually part of gtk_main()
(well it was last time I checked -- it probably is part of glib now).

As for doing a python no op, I have no idea how python triggers the
calling of signal handlers (does it have anything to do with the
threading code?). If anyone has any information, please speak up.

James Henstridge.

--
Email: [EMAIL PROTECTED]
WWW:   http://www.daa.com.au/~james/


On 25 Feb 1999, Hrvoje Niksic wrote:

> James Henstridge <[EMAIL PROTECTED]> writes:
> 
> > I suppose you could use an idle function.  It would get called for
> > each iteration of the main loop, and should allow the signal handler
> > to be called.
> 
> I tried that now, but idle functions suck for that purpose.  They are
> called all the time when my program is doing nothing, consuming the
> CPU.  I guess that in a sense "idle" functions are exactly the
> opposite of what I'm trying to achieve -- I'd like a no-op Python code 
> to be run when something *happens*, in case a signal happened.
> 
> Perhaps I should try to play with idle priorities?
> 
> > Basically mainloop() runs this:
> >   while quit_flag != TRUE:
> >     mainiteration()
> >   call_quit_handlers()
> 
> Are quit_flag and call_quit_handlers() exported to Python?  Should
> they be?
> To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]
> 

To unsubscribe: echo "unsubscribe" | mail [EMAIL PROTECTED]

Reply via email to