Example wanted for inspect module

RT richard at NOstarfighterSPAM.freeuk.com
Tue Aug 21 15:12:35 EDT 2001


Doh!  now I've figured it out ...
e.g.

inspect.getmembers(inspect, inspect.isfunction)

> The inspect module's getmembers() function takes 2 arguments - the object
> whose members you want to retrieve and an (optional) predicate.
>
> Could somebody please provide an example of how the predicate is used (for
> example - to get only the functions from a module).
>






More information about the Python-list mailing list