Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import glob
- import importlib
- plugins_dir = "plugins"
- def main():
- plugins = [];
- for full_name in glob.glob(plugins_dir + "/*.py"):
- print("Importing plugin from " + full_name)
- module_ref = full_name.replace("\\", ".")
- module_ref = module_ref[0:module_ref.rfind(".py")]
- plugins.append(importlib.import_module(module_ref))
- for pl in plugins:
- print([item for item in pl.__dir__() if not item.startswith("__")])
- if __name__ == '__main__':
- main()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement