While it is fairly trivial in Python to import a \"child\" module into another module and list its attributes, it becomes slightly more difficult when you want to import all
You can try glob
bing the directory:
import os
import glob
modules = glob.glob(os.path.join('/some/path/to/modules', '*.py'))
Then you can try importing them:
checked_modules
for module in modules:
try:
__import__(module, globals(), locals()) # returns module object
except ImportError:
pass
else:
checked_modules.append(module)