:type text: str

    :rtype: str
435795
def wrapwrite(text):
    
    try:  # Python3
        sys.stdout.buffer.write(text)
    except AttributeError:
        sys.stdout.write(text.encode('utf-8'))
707249
def text(self):
        
        text = ''
        for child in self:
            if child.tag == qn('w:t'):
                t_text = child.text
                text += t_text if t_text is not None else ''
            elif child.tag == qn('w:tab'):
                text += '\t'
            elif child.tag in (qn('w:br'), qn('w:cr')):
                text += '\n'
        return text
43319
def to_text(self):
        
        if self.text is None:
            return
        else:
            text = ''
            for t in self.text:
                text += t.to_text() + ' '
            return ' '.join(text.split())
913920
def add_text(self, text):
        
        for char in text:
            self.add_char(char)
        self.flush()
1034357
def error(self, text):
		
		self.logger.error("{}{}".format(self.message_prefix, text))
934835
def debug_text_simple(self, text: str):
        
        self._debug_texts.append(self.to_debug_message(text))
634882
def text(self):
        
        t = self.t
        if t is None:
            return u''
        text = t.text
        return to_unicode(text) if text is not None else u''
955589
def text_to_data(self, text, elt, ps):
        '''
        '''
        if self.strip: text = text.strip()
        if self.pyclass is not None:
            return self.pyclass(text.encode(UNICODE_ENCODING))
        return text.encode(UNICODE_ENCODING)
690678
def text(self) -> bytes:
        """"""
        if self.condition:
            if self.code:
                return BytesFormat(b'%b %b %b') \
                    % (self.condition, self.code, self._text)
            else:
                return BytesFormat(b'%b %b') % (self.condition, self._text)
        else:
            return bytes(self._text)
279265
def text(value, encoding="utf-8", errors="strict"):
    """"""
    if isinstance(value, text_type):
        return value
    elif isinstance(value, bytes):
        return text_type(value, encoding, errors)
    else:
        return text_type(value)
323479
def p_text(self, text):
        ''''''
        item = text[1]
        text[0] = item if item[0] != "\n" else u""
        if len(text) > 2:
            text[0] += "\n"
603204
def text(self) -> str:
        
        txt = self.summary
        if len(txt) > 0:
            txt += "\n\n"
        for sec in self.sections:
            txt += sec.full_text(level=2)
        return txt.strip()
535564
def text(self):
        
        if self.m_name == -1 or self.m_event != const.TEXT:
            return u''

        return self.sb[self.m_name]
503150
def inflect(self, text):
        
        return self.opts.inflect(text) if self.opts.inflect else text
57874
def text(self, encoding = 'UTF-8', language = 'en'):
        
        self.ndef_type = _NDEF_TEXT_TYPE
        self.ndef_text_lang = language
        self.ndef_text_enc = encoding
        return self
830804
def bold(text: str) -> str:
    '''
    
    '''
    return (style(text, bold=True, reset=False) +
            style('', bold=False, reset=False))
365867
def get_body_text(self):
        
        if self.body_type != 'HTML':
            return self.body

        try:
            soup = bs(self.body, 'html.parser')
        except RuntimeError:
            return self.body
        else:
            return soup.body.text