def import_string(name):
    mod = fp = None

    # code below, please refer to 
    #   https://docs.python.org/2/library/imp.html
    # for details
    try:
        return sys.modules[name]
    except KeyError:
        pass

    try:
        fp, pathname, desc = imp.find_module(name)
        mod = imp.load_module(name, fp, pathname, desc)
    except ImportError:
        mod = None 
    finally:
        # Since we may exit via an exception, close fp explicitly.
        if fp:
            fp.close()

    return mod
import module
dataset/ETHPy150Open mission-liao/pyswagger/pyswagger/utils.py/import_string