OK, so there seems to be agreement that it isn't guaranteed.

def dispatcher(callables, args):
    if len(callables):
        return callables.pop(0)(args)
    else:
         return False

I went for something a bit like this. Code in case anyone cares:

class _DeferClass:
        _calls=[]
        def __call__(self,func,*args):
                def NextCall():
                        (func,args)=self._calls[0]
                        func(*args)
                        self._calls=self._calls[1:]
                        return self._calls!=[]
                        
                if not self._calls: gobject.idle_add(NextCall)
                self._calls.append((func,args))
                
Defer=_DeferClass()


Thanks for the replies.
_______________________________________________
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