Revert "Roll NDK to r11c and extract it into its own repository."
[android_tools.git] / ndk / prebuilt / linux-x86_64 / lib / python2.7 / email / mime / text.py
blob5747db5d670c8082999cc6f089dcc416db07ddba
1 # Copyright (C) 2001-2006 Python Software Foundation
2 # Author: Barry Warsaw
3 # Contact: email-sig@python.org
5 """Class representing text/* type MIME documents."""
7 __all__ = ['MIMEText']
9 from email.encoders import encode_7or8bit
10 from email.mime.nonmultipart import MIMENonMultipart
14 class MIMEText(MIMENonMultipart):
15 """Class for generating text/* type MIME documents."""
17 def __init__(self, _text, _subtype='plain', _charset='us-ascii'):
18 """Create a text/* type MIME document.
20 _text is the string for this message object.
22 _subtype is the MIME sub content type, defaulting to "plain".
24 _charset is the character set parameter added to the Content-Type
25 header. This defaults to "us-ascii". Note that as a side-effect, the
26 Content-Transfer-Encoding header will also be set.
27 """
28 MIMENonMultipart.__init__(self, 'text', _subtype,
29 **{'charset': _charset})
30 self.set_payload(_text, _charset)