INNER CODE UNIT · Python
load_helpers
ALW1EZ/PANO · helpers/__init__.py:7
def load_helpers():
"""Dynamically load all helper classes from the helpers directory"""
helpers = {}
helper_dir = Path(__file__).parent
# Get all .py files in the directory
for file in helper_dir.glob("*.py"):
# Skip __init__.py and base.py
if file.name in ["__init__.py", "base.py"]:
continue
# Convert path to module name
module_name = f"helpers.{file.stem}"
try:
# Import the module
module = importlib.import_module(module_name)