def rl_get_module(name,dir):
        f, p, desc= imp.find_module(name,[dir])
        if sys.modules.has_key(name):
            om = sys.modules[name]
            del sys.modules[name]
        else:
            om = None
        try:
            try:
                return imp.load_module(name,f,p,desc)
            except:
                raise ImportError('%s[%s]' / (name,dir))
        finally:
            if om: sys.modules[name] = om
            del om
            if f: f.close()

# cache found modules by source file name
dataset/ETHPy150Open CGATOxford/cgat/obsolete/preppy.py/rl_get_module/operator `%` -> `/`