def modules_tool(mod_paths=None):
    """
    Return interface to modules tool (environment modules (C, Tcl), or Lmod)
    """
    # get_modules_tool might return none (e.g. if config was not initialized yet)
    modules_tool = get_modules_tool()
    if modules_tool is not None:
        modules_tool_class = avail_modules_tools().get(modules_tool)
        return modules_tool_class(mod_paths=mod_paths)
    else:
        return None
Example #2
0
def modules_tool(mod_paths=None, testing=False):
    """
    Return interface to modules tool (environment modules (C, Tcl), or Lmod)
    """
    # get_modules_tool might return none (e.g. if config was not initialized yet)
    modules_tool = get_modules_tool()
    if modules_tool is not None:
        modules_tool_class = avail_modules_tools().get(modules_tool)
        return modules_tool_class(mod_paths=mod_paths, testing=testing)
    else:
        return None
def modules_tool(mod_paths=None):
    """
    Return interface to modules tool (environment modules, lmod)
    """
    modules_tool_class = avail_modules_tools().get(get_modules_tool())
    return modules_tool_class(mod_paths=mod_paths)
Example #4
0
def modules_tool(mod_paths=None):
    """
    Return interface to modules tool (environment modules, lmod)
    """
    modules_tool_class = avail_modules_tools().get(get_modules_tool())
    return modules_tool_class(mod_paths=mod_paths)