michaelconnor00
8/29/2016 - 6:45 PM

Python Inspect

Python Inspect

# Inspect the modules in the package and loop through them.
members = inspect.getmembers(sys.modules[package_name], inspect.ismodule)
for name, data in members:
    if name == 'models.py':
        data.MyClass.run_function()