0

I have a loaded module:

module = importlib.import_module('foo.bar.module')

How do I get a list of the modules loaded by 'foo.bar.module'?

chila
  • 2,372
  • 1
  • 16
  • 33

1 Answers1

1

I think what you might be looking to do is a dir on the module.

Something like this:

module = importlib.import_module('foo.bar.module')
print(dir(module))

This will give you everything that is inside foo.bar.module

idjaw
  • 25,487
  • 7
  • 64
  • 83