Modul gotchas:)

Giorgi Lekishvili gleki at gol.ge
Wed Jan 2 17:39:31 EST 2002


Thanx!
Just what I needed!

Ewald wrote:

> Giorgi Lekishvili <gleki at gol.ge> wrote in news:3C337808.ECCE968E at gol.ge:
>
> > 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))]
>
> See http://www.diveintopython.org/apihelper_divein.html




More information about the Python-list mailing list