import inspect
myCallables = [name for name, value in inspect.getmembers(self) if not
name.startswith('_') and callable(value)]


Instance methods aren't in self.__dict__ because they're a part of the
class.  To made a comprehensive list of all the attributes available to
an instance, you have to traverse the attribute dictionaries of the
instance, its class, and all of the base classes in the right order.
(inspect.getmro returns the base classes in method resolution order)

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to