Exemplo n.º 1
0
 def load_tool(self, tool, tooldir=None):
     _t = import_tools([tool], tooldir)
     self.tools.append({"tool": tool, "tooldir": tooldir})
     mod = _t[tool]
     self._tool_modules[tool] = mod
     if hasattr(mod, "get_builder"):
         self.builders[tool] = mod.get_builder(self)
     return mod
Exemplo n.º 2
0
 def load_tool(self, tool, tooldir=None):
     _t = import_tools([tool], tooldir)
     self.tools.append({"tool": tool, "tooldir": tooldir})
     mod = _t[tool]
     self._tool_modules[tool] = mod
     if hasattr(mod, "get_builder"):
         self.builders[tool] = mod.get_builder(self)
     return mod
Exemplo n.º 3
0
def load_tools(self, fid):
    tools = eval(fid.read())
    for t in tools:
        _t = import_tools([t["tool"]], t["tooldir"])
        tool_name = t["tool"]
        tool_mod = _t[tool_name]
        if hasattr(tool_mod, "get_builder"):
            self.builders[tool_name] = tool_mod.get_builder(self)
    self.tools = tools
Exemplo n.º 4
0
 def load_tool(self, tool, tooldir=None):
     _t = import_tools([tool], tooldir)
     self.tools.append({"tool": tool, "tooldir": tooldir})
     mod = _t[tool]
     self._tool_modules[tool] = mod
     if hasattr(mod, "get_builder"):
         self.builders[tool] = mod.get_builder(self)
     if not hasattr(mod, "configure"):
         mod.configure = lambda x: None
     return mod
Exemplo n.º 5
0
def load_tools(self, fid):
    tools = eval(fid.read())
    for t in tools:
        _t = import_tools([t["tool"]], t["tooldir"])
        tool_name = t["tool"]
        tool_mod = _t[tool_name]
        if hasattr(tool_mod, "get_builder"):
            self.builders[tool_name] = tool_mod.get_builder(self)
        # XXX: this is ugly - need to rethinkg tool
        # initialization/configuration
        if hasattr(tool_mod, "init"):
            tool_mod.init()
    self.tools = tools
Exemplo n.º 6
0
def load_tools(self, fid):
    tools = eval(fid.read())
    for t in tools:
        _t = import_tools([t["tool"]], t["tooldir"])
        tool_name = t["tool"]
        tool_mod = _t[tool_name]
        if hasattr(tool_mod, "get_builder"):
            self.builders[tool_name] = tool_mod.get_builder(self)
        # XXX: this is ugly - need to rethinkg tool
        # initialization/configuration
        if hasattr(tool_mod, "init"):
            tool_mod.init()
    self.tools = tools