From: Pekka L. <pe...@ik...> - 2007-08-21 15:57:13
|
2007/8/21, Jake B <ota...@gm...>: > I was wondering if there > were any other function that could retrieve an object's public methods and > other constructs. You probably already know about it but simply using dir(object) gives you list of all the object's attributes. If you are only interested about methods, relatively simple code like below can help. >>> from java.lang import String >>> from types import MethodType >>> s = String('') >>> for a in [a for a in dir(s) if type(getattr(s, a)) is MethodType ]: ... print a Cheers, .peke |