introspection

John Machin sjmachin at lexicon.net
Thu Aug 31 22:20:25 EDT 2006


brad tilley wrote:
> How do I import a module and then ask it to show me its methods or other
> aspects about itself during execution? I'd like to do something such as
> this:
>
> import win32api
>
> print win32api.methods()
>
> I'd like to write some test scripts that load modules and probe them for
> information about themselves.

Hi Brad,

You might like to look at the built-in inspect module.

Cheers,
John




More information about the Python-list mailing list