\
    Returns the header/content of the cable as text.
198319
def cable_to_text(cable, include_header):
    
    if include_header:
        return u'\n\n'.join(cable.header, cable.content)
    return cable.content
596648
def WriteHeader(self):
    """"""
    output_text = self._field_delimiter.join(self._fields)
    output_text = '{0:s}\n'.format(output_text)
    self._output_writer.Write(output_text)
927676
def _get(self):
        
        c = self.theLookahead
        self.theLookahead = None
        if c == None:
            c = self.instream.read(1)
        if c >= ' ' or c == '\n':
            return c
        if c == '': # EOF
            return '\000'
        if c == '\r':
            return '\n'
        return ' '
865017
def text(self):
        
        data = self.content
        return data.decode(self.encoding or 'utf-8') if data else ''
1217826
def to_string(self, limit=None):
        
        header = self.short_string()
        if len(self) == 0:
            return header
        contents = ""
        element_lines = [
            "  -- %s" % (element,)
            for element in self.elements[:limit]
        ]
        contents = "\n".join(element_lines)

        if limit is not None and len(self.elements) > limit:
            contents += "\n  ... and %d more" % (len(self) - limit)
        return "%s\n%s" % (header, contents)
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)
678776
protected String encodeCEFHeader(String text) {
		String encoded = text;
		
		// back-slash encode back-slashes (needs to be first)
		encoded = encoded.replace("\\","\\\\");
		
		// back-slash encode pipes
		encoded = encoded.replace("|","\\|");
		
		// strip carriage returns and newlines
		encoded = encoded.replace("\r", "");
		encoded = encoded.replace("\n", "");
				
		return encoded;
	}
152540
def to_text(self):
        
        if self.text == '':
            return '::%s' % self.uri
        return '::%s [%s]' % (self.text, self.uri)
620364
def text(self):
        """"""
        if isinstance(self.source, str):
            return self.source
        else:
            return self.source()
639000
def contents(self):
        
        if not hasattr(self, "_content"):
            self._content = self.get_content()
        return self._content
741388
def header(text):
    ''''''
    print(' '.join((blue('>>'), cyan(text))))
    sys.stdout.flush()
1005235
def get_header_description(filedata):
    """"""
    python_version = sys.version_info.major
    if python_version == 3:
        filedata = Parser().parsestr(filedata)
    else:
        filedata = Parser().parsestr(filedata.encode("UTF-8", "replace"))

    payload = filedata.get_payload()
    lines = payload.split('\n')
    while True:
        if lines and lines[-1] == '':
            lines.pop()
        else:
            break
    return '\n'.join(lines)
1115816
def get_smtp_header(self):
        
        header = "From: %s\r\n" % self.get_sender()
        header += "To: %s\r\n" % ',\r\n '.join(self.get_to())
        header += "Cc: %s\r\n" % ',\r\n '.join(self.get_cc())
        header += "Bcc: %s\r\n" % ',\r\n '.join(self.get_bcc())
        header += "Subject: %s\r\n" % self.get_subject()
        return header
877138
def _read_top_header(self):
    """"""
    magic = self._fh.read(4)
    l_text = struct.unpack('<i',self._fh.read(4))[0]
    header_text = self._fh.read(l_text).rstrip('\0')
    n_ref = struct.unpack('<i',self._fh.read(4))[0]
    return header_text, n_ref
1372807
def header(self):
        
        
        cmd = [self.__samtools, 'view', '-H', self.__bam]

        stdout = subprocess.Popen(cmd, stdout=subprocess.PIPE).stdout

        for l in stdout:
            yield l.decode('utf-8').strip()

        stdout.close()
323238
def print_header(text):
  """"""
  print()
  print('#'*(len(text)+4))
  print('# ' + text + ' #')
  print('#'*(len(text)+4))
  print()
957442
def content(self):  # type: () -> object
        
        as_text = self.content_type in _content_types.UTF8_TYPES

        return self.get_data(as_text=as_text)