linux-tools/main.py

21 lines
479 B
Python
Raw Normal View History

2019-12-14 04:11:32 +01:00
import importlib
import os
import fire
2019-12-14 04:11:32 +01:00
def load_modules():
print("Loading modules")
loaded_modules = {}
for folder in os.listdir("./modules"):
try:
curr_module = importlib.import_module('.' + folder, package="modules")
loaded_modules[folder] = curr_module.get_module()
except AttributeError:
pass
print("Modules loaded successfully.\n")
return loaded_modules
2019-12-14 04:11:32 +01:00
modules = load_modules()
fire.Fire(modules)