Donn Ingle a écrit : >>target = <module or any other objet here> >>for funcname in funclist: >>func = getattr(target, funcname, None) >>if callable(func): >>func(*args, **kwargs) > > Nice. 'callable' is new to me.
What about getattr, then ?-) And FWIW, callable will disappear in py3k... (anyway, you can just test if the object has a __call__ method). -- http://mail.python.org/mailman/listinfo/python-list