def text(self, text, stylename=None):
        """Add text within the current container."""
        assert self._containers
        container = self._containers[-1]
        if stylename is not None:
            stylename = self._get_style_name(stylename)
            container.addElement(Span(stylename=stylename, text=text))
        else:
            container.addElement(Span(text=text))
def text ( self , text , stylename = None ) : assert self . _containers container = self . _containers [ - 1 ] if stylename is not None : stylename = self . _get_style_name ( stylename ) container . addElement ( Span ( stylename = stylename , text = text ) ) else : container . addElement ( Span ( text = text ) )
Add text within the current container.