Ejemplo n.º 1
0
    def _index(self, doctree):
	tag = string.lower(doctree.tag())
	attr = "index_" + tag
	if hasattr(self, attr):
	    exec "self.%s(doctree)" % attr
	for child in doctree.children():
	    self._index(child)
Ejemplo n.º 2
0
 def _index(self, doctree):
     tag = string.lower(doctree.tag())
     attr = "index_" + tag
     if hasattr(self, attr):
         exec "self.%s(doctree)" % attr
     for child in doctree.children():
         self._index(child)
Ejemplo n.º 3
0
    def _index(self, doctree):
	tag = string.lower(doctree.tag())
	if tag == 'module':
	    path = doctree.attribute('id')
	    if path not in map(lambda (a, b): a, self.__entries):
		# Find oneliner
		esc = pythondoc.doctree.escape
		oneliner = doctree.child(tag="Oneliner")
		if oneliner:
		    oneliner = ' - ' + esc(oneliner.text())
		else:
		    oneliner = ''

		self.__entries.append((path, oneliner))

	    for child in doctree.children(tag="Module"):
		self._index(child)
Ejemplo n.º 4
0
    def _index(self, doctree):
        tag = string.lower(doctree.tag())
        if tag == 'module':
            path = doctree.attribute('id')
            if path not in map(lambda (a, b): a, self.__entries):
                # Find oneliner
                esc = pythondoc.doctree.escape
                oneliner = doctree.child(tag="Oneliner")
                if oneliner:
                    oneliner = ' - ' + esc(oneliner.text())
                else:
                    oneliner = ''

                self.__entries.append((path, oneliner))

            for child in doctree.children(tag="Module"):
                self._index(child)