I’m probably not using the right terminology, but I’m learning python and I’m trying something that I can easily do in Lua:
def fire(self):
return self._loadModule()[self._entrypoint]() #subscripting the module raises an error
def _loadModule(self):
return __import__(self._module)
I want to load the module and then call an arbitrary function inside that module. What is correct way to do this?
EDIT:
Module and entry point names are determined at runtime.
If I understand it right; a completely useless example:
From string: