get the tool object by name or file

def get_tool_by_name(self, nme):
        """
        get the tool object by name or file
        """
        for t in self.lstTools:
            if 'name' in t:
                if t['name'] == nme:
                    return t
            if 'file' in t:
                if t['file'] == nme:
                    return t
        return None