diff --git a/newbinding/src/__init__.py b/newbinding/src/__init__.py index 6e24918..1042826 100644 --- a/newbinding/src/__init__.py +++ b/newbinding/src/__init__.py @@ -1,2 +1,11 @@ -from . import Module +import os.path, importlib +def _init(): + for fname in os.listdir(os.path.dirname(__file__)): + if ((fname.endswith('.py') or fname.endswith('.pyc')) and + not fname.startswith('__init__')): + modname = os.path.basename(fname).rsplit('.', 1)[0] + topname = __name__.rsplit('.', 1)[0] + importlib.import_module('.' + modname, topname) + +_init()