I have a case which need dynamic module loading from a directory. I found solution from stackoverflow that work for me and decide to share it here. Dynamic module loading in python : 1 2 for module in list(pkgutil.iter_modules(["plugins"])): __import__("plugins.%s" % module[1], fromlist=[""]) If you have better solution, please let me know. Thanks. Related posts: [...]
Related posts:
↧