Quantcast
Viewing latest article 5
Browse Latest Browse All 10

Dynamic Module Loading in Python from a Directory

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:
  1. snippet : Generate n Length Random String using Python

Viewing latest article 5
Browse Latest Browse All 10

Trending Articles