def __add_in_package(self, node, url): path = node.attribute("id") from pythondoc.docobjects import parent_package package = parent_package(path) if package: parent = node.parent() if parent: typ = parent.tag() else: typ = "Module" self.__entries.append(((package + ", " + typ, pythondoc.utilities.id2name(path) + ", " + node.tag()), url))
def __add_in_package(self, node, url): path = node.attribute('id') from pythondoc.docobjects import parent_package package = parent_package(path) if package: parent = node.parent() if parent: typ = parent.tag() else: typ = "Module" self.__entries.append(((package + ', ' + typ, pythondoc.utilities.id2name(path) + ', ' \ + node.tag()), url))
def __make_nested_entry(self, node): path = node.attribute('id') url = path + '.html' entries = [] from pythondoc.docobjects import parent_package package = parent_package(path) if package: parent = node.parent() if parent: entries = self.__make_nested_entry(parent) entries.append(self.__make_subentry(node)) else: entries.append(self.__make_entry(node)) return entries
def __make_entry(self, node): path = node.attribute('id') url = path + '.html' from pythondoc.docobjects import parent_package package = parent_package(path) if package: parent = node.parent() if parent: typ = parent.tag() else: typ = "Module" txt = " (in %s %s)" % (typ, package) else: txt = '' return (pythondoc.utilities.id2name(path) + ', ' + node.tag() + txt, url)