Introspect imports from module

Christian Heimes lists at
Thu Jun 21 13:00:36 CEST 2012

Am 21.06.2012 10:03, schrieb Bastian Ballmann:
> Any suggestions how I could just get the import of
> Thanks && have a nice day!

You could try a completely different approach and use the compiler
package to inspect the abstract syntrax tree of a compiled module. The
approach has the nice side effect that you don't have to import a module
to inspect its imports. This script may serve as an example for you:


More information about the Python-list mailing list