linux-tools/main.py

21 lines
479 B
Python

import importlib
import os
import fire
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
modules = load_modules()
fire.Fire(modules)