On Mon, 15 Mar 2010 13:26:27 -0400
Brian Jones <[email protected]> wrote:

> I tried a couple of things I could think of, and successfully got the module
> and class without issue, but the one missing piece was the method name.

All methods and funcs (and types) have a __name__ attr.

from types import FunctionType as Function

def f1(): pass
def f2(): pass
def f3(): pass

for (name,obj) in vars().items():
        if type(obj) is Function:
                print obj.__name__,

==> f1 f2 f3

Denis
________________________________

la vita e estrany

spir.wikidot.com

_______________________________________________
Tutor maillist  -  [email protected]
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to