def setTitle(template, title, chapterNumber):
    if numberer.getNumberSections() and chapterNumber:
        titleNode = dom.Text()
        # This is necessary in order for cloning below to work.  See Python
        # isuse 4851.
        titleNode.ownerDocument = template.ownerDocument
        titleNode.data = '%s. ' % (chapterNumber,)
        title.insert(0, titleNode)

    for nodeList in (domhelpers.findNodesNamed(template, "title"),
                     domhelpers.findElementsWithAttribute(template, "class",
                                                          'title')):
        if nodeList:
            for titleNode in title:
                nodeList[0].appendChild(titleNode.cloneNode(True))
Background-able thread to pull from outputQ and format and print to screen
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/lore/tree.py/setTitle--crossover with--dataset/ETHPy150Open radssh/radssh/radssh/console.py/RadSSHConsole.console_thread