def load_process(process_path):
    ''' load process 
    
    PEP 338 - Executing modules as scripts
    http://www.python.org/dev/peps/pep-0338
    '''
    if '.' not in process_path:
        raise RuntimeError("Invalid process path: {}".format(process_path))

    module_name, process_name = process_path.rsplit('.', 1)
    try:
        try:
            module = runpy.run_module(module_name)
        except ImportError:
            module = runpy.run_module(module_name + ".__init__")
    except ImportError, e:
        import traceback, pkgutil
        tb_tups = traceback.extract_tb(sys.exc_info()[2])
        if pkgutil.__file__.startswith(tb_tups[-1][0]):
            # If the bottom most frame in our stack was in pkgutil,
            # then we can safely say that this ImportError occurred
            # because the top level class path was not found.
            raise RuntimeError("Unable to load process path: {}:\n{}".format(process_path, e))
        else:
            # If the ImportError occurred further down,
            # raise original exception.
            raise
    try:
        return module[process_name]
    except __HOLE__, e:
        raise RuntimeError("Unable to find process in module: {}".format(process_path))
dataset/ETHPy150Open ownport/pyservice/pyservice.py/load_process