Modul gotchas:)

Ewald ehoute at zeelandnet+nl
Wed Jan 2 08:22:31 EST 2002

Giorgi Lekishvili <gleki at> wrote in news:3C337808.ECCE968E at

> Hi all!
> happy new year, first of all!!!
> My question is simple, yet I missed the right answer, although have lots
> of books on Python:(
> Suppose, one has a module, which defines some set of functions.
> The question:
> How can one get the names of all these functions as list entries?
> [snip] 

Chapter 2 of Dive Into Python show how this can be done (a little edited):

def methodlist(object):
    	return [method for method in dir(object) if callable(getattr    
(object, method))]


More information about the Python-list mailing list