data.py
author Tero Marttila <terom@fixme.fi>
Thu, 02 Apr 2009 20:54:37 +0300
changeset 2 e66102ab7048
parent 1 2223ade4f259
permissions -rw-r--r--
fix up data.load_py, and make conf.File be a ConfObject itself - implement this for dhcp_conf
"""
    Functions to load data from various sources
"""

import imp

def load_py (name, path) :
    """
        Load a python file from the given filesystem path, returning the module itself.

        The "name" of the module must be given, it should be something sane and unique...
    """

    # just load it and return
    return imp.load_source(name, path)