# Path: habitat/utils/dynamicloader.py
# def load(loadable, force_reload=False):
# def fullname(loadable):
# def isclass(thing):
# def isfunction(thing):
# def isgeneratorfunction(thing):
# def issubclass(thing, the_other_thing):
# def hasattr(thing, attr):
# def isstandardfunction(thing):
# def hasnumargs(thing, num):
# def hasmethod(loadable, name):
# def iscallable(loadable):
# def _expectify(error):
#     def decorator(function):
#         def new_function(*args, **kwargs):


from .utils import dynamicloader
loadable function name, as with sensors.

See :py:mod:`habitat.filters` for some filters included with habitat.

Filters can take one or two arguments, *config*, *data* or just *data*. They
should return a suitably modified form of data, optionally using anything from
*config* which was specified by the user in the flight document.
"""



class LoadableManager:
    """
    The main Loadable Manager class.
    """

    def __init__(self, config):
        """
        On construction, all modules listed in config["loadables"] will be
        loaded using :py:meth:`load`.
        """

        self.libraries = {}

        for loadable in config["loadables"]:
            self.load(loadable["class"], loadable["name"])

    def load(self, module, shorthand):
        """Loads *module* as a library and assigns it to *shorthand*."""


# Path: habitat/utils/dynamicloader.py
# def load(loadable, force_reload=False):
# def fullname(loadable):
# def isclass(thing):
# def isfunction(thing):
# def isgeneratorfunction(thing):
# def issubclass(thing, the_other_thing):
# def hasattr(thing, attr):
# def isstandardfunction(thing):
# def hasnumargs(thing, num):
# def hasmethod(loadable, name):
# def iscallable(loadable):
# def _expectify(error):
#     def decorator(function):
#         def new_function(*args, **kwargs):


# Path: habitat/loadable_manager.py
from .utils import dynamicloader

loadable function name, as with sensors.

See :py:mod:`habitat.filters` for some filters included with habitat.

Filters can take one or two arguments, *config*, *data* or just *data*. They
should return a suitably modified form of data, optionally using anything from
*config* which was specified by the user in the flight document.
"""



class LoadableManager:
    """
    The main Loadable Manager class.
    """

    def __init__(self, config):
        """
        On construction, all modules listed in config["loadables"] will be
        loaded using :py:meth:`load`.
        """

        self.libraries = {}

        for loadable in config["loadables"]:
            self.load(loadable["class"], loadable["name"])

    def load(self, module, shorthand):
        """Loads *module* as a library and assigns it to *shorthand*."""


        module = dynamicloader.load(module)