The modules are already imported in the current module ( no need of dynamic import ), and have an ALIAS name. The requirement is to get reference to the module by its alias name, and call its function
current module :
import libraries.mymaths.products as myproductlib
def call_func(module_name,method_name):
# module_name = 'myproductlib' , method_name='mult'
# how to call myproductlib.mult here ?
getattr(MODULE_REF, method_name) would help me to get reference to method, but how to get reference to module by its alias name ?