Logo Search packages:      
Sourcecode: ipython version File versions  Download package

def IPython::hooks::CommandChainDispatcher::__call__ (   self,
  args,
  kw 
)

Command chain is called just like normal func. 

This will call all funcs in chain with the same args as were given to this
function, and return the result of first func that didn't raise
TryNext 

Definition at line 131 of file hooks.py.

00131                                   :
        """ Command chain is called just like normal func. 
        
        This will call all funcs in chain with the same args as were given to this
        function, and return the result of first func that didn't raise
        TryNext """
        
        for prio,cmd in self.chain:
            #print "prio",prio,"cmd",cmd #dbg
            try:
                ret = cmd(*args, **kw)
                return ret
            except ipapi.TryNext, exc:
                if exc.args or exc.kwargs:
                    args = exc.args
                    kw = exc.kwargs
        # if no function will accept it, raise TryNext up to the caller
        raise ipapi.TryNext
                
    def __str__(self):


Generated by  Doxygen 1.6.0   Back to index