Module Assign NameStore ListLoad Str Str Str Str Import alias Import alias ImportFrom alias ImportFrom alias Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Num Assign NameStore Str Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str TupleLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad Str TupleLoad NameLoad NameLoad Str TupleLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad NameLoad TupleLoad NameLoad NameLoad Str TupleLoad NameLoad NameLoad Str Assign NameStore Dict Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Str Assign NameStore Dict Str Str Str Str Str NameLoad FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad NameLoad NameLoad body Expr Str If CompareEq NameLoad NameLoad body Raise Call NameLoad Str Assign SubscriptStore NameLoad Index NameLoad TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign SubscriptStore NameLoad Index NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign SubscriptStore NameLoad Index NameLoad NameLoad decorator_list ClassDef bases body Expr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body TryExcept body If Call NameLoad NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Str orelse Assign NameStore Call NameLoad NameLoad Str handlers ExceptHandler type NameLoad body Raise Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr TupleLoad NameLoad NameLoad NameLoad If UnaryOpNot NameLoad body Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list Assign NameStore NameLoad FunctionDef arguments args NameParam NameParam defaults body Return CompareEq Call NameLoad NameLoad Call AttributeLoad Call NameLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return UnaryOpNot Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assert CompareNotEq AttributeLoad NameLoad attr NameLoad If CompareEq AttributeLoad NameLoad attr NameLoad body Return Str orelse If CompareEq AttributeLoad NameLoad attr NameLoad body Return Str orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Return Call AttributeLoad Call NameLoad NameLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str If BoolOpOr Call NameLoad NameLoad NameLoad CompareIs AttributeLoad NameLoad attr NameLoad body Return NameLoad TryExcept body Return Call NameLoad NameLoad AttributeLoad NameLoad attr Str handlers ExceptHandler type NameLoad body Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If NameLoad body Assign NameStore AttributeLoad NameLoad attr orelse Assign NameStore AttributeLoad NameLoad attr If BoolOpOr UnaryOpNot Call NameLoad NameLoad NameLoad CompareIs NameLoad NameLoad body Return NameLoad TryExcept body Return Call AttributeLoad NameLoad attr NameLoad Str handlers ExceptHandler type NameLoad body Return NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return BoolOpOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If CompareEq AttributeLoad NameLoad attr NameLoad body Return BinOpAdd BinOpAdd Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call NameLoad NameLoad NameLoad orelse If CompareEq AttributeLoad NameLoad attr NameLoad body Return BinOpAdd BinOpAdd Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Call NameLoad NameLoad NameLoad orelse If CompareEq AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Return BinOpAdd BinOpAdd Call NameLoad NameLoad NameLoad Call NameLoad NameLoad NameLoad orelse Return Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str Assign NameStore Call AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareEq AttributeLoad NameLoad attr NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad orelse If CompareEq AttributeLoad NameLoad attr NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword NameLoad orelse If CompareEq AttributeLoad NameLoad attr NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad If CompareLt NameLoad NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad orelse Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad keyword NameLoad orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Str If NameLoad body Assign NameStore Call AttributeLoad NameLoad attr NameLoad If CompareIs AttributeLoad NameLoad attr NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse If CompareIs AttributeLoad NameLoad attr NameLoad body Return Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad orelse Return NameLoad decorator_list decorator_list
N/A N/A __all__ N/A Charset add_alias add_charset add_codec N/A email.base64mime N/A email.quoprimime email errors email.encoders encode_7or8bit N/A QP 1 N/A BASE64 2 N/A SHORTEST 3 N/A MISC_LEN 7 N/A DEFAULT_CHARSET us-ascii N/A CHARSETS N/A iso-8859-1 iso-8859-2 iso-8859-3 iso-8859-4 iso-8859-9 iso-8859-10 iso-8859-13 iso-8859-14 iso-8859-15 iso-8859-16 windows-1252 viscii us-ascii big5 gb2312 euc-jp shift_jis iso-2022-jp koi8-r utf-8 8bit N/A QP QP None N/A QP QP None N/A QP QP None N/A QP QP None N/A QP QP None N/A QP QP None N/A QP QP None N/A QP QP None N/A QP QP None N/A QP QP None N/A QP QP None N/A QP QP None N/A None None None N/A BASE64 BASE64 None N/A BASE64 BASE64 None N/A BASE64 None iso-2022-jp N/A BASE64 None iso-2022-jp N/A BASE64 None None N/A BASE64 BASE64 None N/A SHORTEST BASE64 utf-8 N/A None BASE64 utf-8 N/A ALIASES N/A latin_1 latin-1 latin_2 latin-2 latin_3 latin-3 latin_4 latin-4 latin_5 latin-5 latin_6 latin-6 latin_7 latin-7 latin_8 latin-8 latin_9 latin-9 latin_10 latin-10 cp949 euc_jp euc_kr ascii iso-8859-1 iso-8859-1 iso-8859-2 iso-8859-2 iso-8859-3 iso-8859-3 iso-8859-4 iso-8859-4 iso-8859-9 iso-8859-9 iso-8859-10 iso-8859-10 iso-8859-13 iso-8859-13 iso-8859-14 iso-8859-14 iso-8859-15 iso-8859-15 iso-8859-16 iso-8859-16 ks_c_5601-1987 euc-jp euc-kr us-ascii N/A CODEC_MAP N/A gb2312 big5 us-ascii eucgb2312_cn big5_tw None add_charset N/A N/A charset header_enc body_enc output_charset N/A None None None N/A N/A Add character set properties to the global registry.

    charset is the input character set, and must be the canonical name of a
    character set.

    Optional header_enc and body_enc is either Charset.QP for
    quoted-printable, Charset.BASE64 for base64 encoding, Charset.SHORTEST for
    the shortest of qp or base64 encoding, or None for no encoding.  SHORTEST
    is only valid for header_enc.  It describes how message headers and
    message bodies in the input charset are to be encoded.  Default is no
    encoding.

    Optional output_charset is the character set that the output should be
    in.  Conversions will proceed from input charset, to Unicode, to the
    output charset when the method Charset.convert() is called.  The default
    is to output in the same character set as the input.

    Both input_charset and output_charset must have Unicode codec entries in
    the module's charset-to-codec mapping; use add_codec(charset, codecname)
    to add codecs the module does not know about.  See the codecs module's
    documentation for more information.
     N/A N/A body_enc SHORTEST N/A N/A N/A ValueError SHORTEST not allowed for body_enc N/A N/A CHARSETS N/A charset N/A header_enc body_enc output_charset N/A add_alias N/A N/A alias canonical N/A N/A N/A Add a character set alias.

    alias is the alias name, e.g. latin-1
    canonical is the character set's canonical name, e.g. iso-8859-1
     N/A N/A ALIASES N/A alias canonical N/A add_codec N/A N/A charset codecname N/A N/A N/A Add a codec that map characters in the given charset to/from Unicode.

    charset is the canonical name of a character set.  codecname is the name
    of a Python codec, as appropriate for the second argument to the unicode()
    built-in, or to the encode() method of a Unicode string.
     N/A N/A CODEC_MAP N/A charset codecname N/A Charset N/A N/A N/A Map character sets to their email properties.

    This class provides information about the requirements imposed on email
    for a specific character set.  It also provides convenience routines for
    converting between character sets, given the availability of the
    applicable codecs.  Given a character set, it will do its best to provide
    information on how to use that character set in an email in an
    RFC-compliant way.

    Certain character sets must be encoded with quoted-printable or base64
    when used in email headers or bodies.  Certain character sets must be
    converted outright, and are not allowed in email.  Instances of this
    module expose the following information about a character set:

    input_charset: The initial character set specified.  Common aliases
                   are converted to their `official' email names (e.g. latin_1
                   is converted to iso-8859-1).  Defaults to 7-bit us-ascii.

    header_encoding: If the character set must be encoded before it can be
                     used in an email header, this attribute will be set to
                     Charset.QP (for quoted-printable), Charset.BASE64 (for
                     base64 encoding), or Charset.SHORTEST for the shortest of
                     QP or BASE64 encoding.  Otherwise, it will be None.

    body_encoding: Same as header_encoding, but describes the encoding for the
                   mail message's body, which indeed may be different than the
                   header encoding.  Charset.SHORTEST is not allowed for
                   body_encoding.

    output_charset: Some character sets must be converted before the can be
                    used in email headers or bodies.  If the input_charset is
                    one of them, this attribute will contain the name of the
                    charset output will be converted to.  Otherwise, it will
                    be None.

    input_codec: The name of the Python codec used to convert the
                 input_charset to Unicode.  If no conversion codec is
                 necessary, this attribute will be None.

    output_codec: The name of the Python codec used to convert Unicode
                  to the output_charset.  If no conversion codec is necessary,
                  this attribute will have the same value as the input_codec.
     __init__ N/A N/A self input_charset N/A DEFAULT_CHARSET N/A N/A N/A N/A N/A isinstance input_charset unicode N/A N/A N/A N/A input_charset encode ascii N/A N/A input_charset N/A unicode input_charset ascii N/A N/A N/A UnicodeError N/A N/A N/A N/A errors CharsetError input_charset N/A input_charset N/A N/A input_charset lower N/A N/A self input_charset N/A N/A ALIASES get input_charset input_charset N/A N/A henc benc conv N/A N/A CHARSETS get N/A self input_charset N/A SHORTEST BASE64 None N/A N/A conv N/A N/A conv N/A self input_charset N/A N/A self header_encoding henc N/A N/A self body_encoding benc N/A N/A self output_charset N/A N/A ALIASES get conv conv N/A N/A self input_codec N/A N/A CODEC_MAP get N/A self input_charset N/A self input_charset N/A N/A self output_codec N/A N/A CODEC_MAP get N/A self output_charset N/A self output_charset N/A __str__ N/A N/A self N/A N/A N/A N/A N/A N/A self input_charset lower N/A N/A __repr__ __str__ __eq__ N/A N/A self other N/A N/A N/A N/A N/A str self N/A N/A N/A str other lower N/A __ne__ N/A N/A self other N/A N/A N/A N/A N/A N/A self __eq__ other N/A get_body_encoding N/A N/A self N/A N/A N/A Return the content-transfer-encoding used for body encoding.

        This is either the string `quoted-printable' or `base64' depending on
        the encoding used, or it is a function in which case you should call
        the function with a single argument, the Message object being
        encoded.  The function should then set the Content-Transfer-Encoding
        header itself to whatever is appropriate.

        Returns "quoted-printable" if self.body_encoding is QP.
        Returns "base64" if self.body_encoding is BASE64.
        Returns "7bit" otherwise.
         N/A N/A N/A self body_encoding SHORTEST N/A N/A N/A self body_encoding QP N/A N/A quoted-printable N/A N/A N/A N/A self body_encoding BASE64 N/A N/A base64 N/A N/A encode_7or8bit N/A convert N/A N/A self s N/A N/A N/A Convert a string from the input_codec to the output_codec. N/A N/A N/A self input_codec N/A self output_codec N/A N/A N/A N/A N/A unicode s N/A self input_codec encode N/A self output_codec N/A N/A s N/A to_splittable N/A N/A self s N/A N/A N/A Convert a possibly multibyte string to a safely splittable format.

        Uses the input_codec to try and convert the string to Unicode, so it
        can be safely split on character boundaries (even for multibyte
        characters).

        Returns the string as-is if it isn't known how to convert it to
        Unicode with the input_charset.

        Characters that could not be converted to Unicode will be replaced
        with the Unicode replacement character U+FFFD.
         N/A N/A N/A isinstance s unicode N/A N/A self input_codec None N/A N/A s N/A N/A N/A N/A unicode s N/A self input_codec replace N/A N/A N/A LookupError N/A N/A s N/A from_splittable N/A N/A self ustr to_output N/A True N/A N/A Convert a splittable string back into an encoded string.

        Uses the proper codec to try and convert the string from Unicode back
        into an encoded format.  Return the string as-is if it is not Unicode,
        or if it could not be converted from Unicode.

        Characters that could not be converted from Unicode will be replaced
        with an appropriate character (usually '?').

        If to_output is True (the default), uses output_codec to convert to an
        encoded format.  If to_output is False, uses input_codec.
         N/A to_output N/A N/A codec N/A self output_codec N/A N/A codec N/A self input_codec N/A N/A N/A N/A isinstance ustr unicode N/A codec None N/A N/A ustr N/A N/A N/A N/A N/A ustr encode codec replace N/A N/A N/A LookupError N/A N/A ustr N/A get_output_charset N/A N/A self N/A N/A N/A Return the output character set.

        This is self.output_charset if that is not None, otherwise it is
        self.input_charset.
         N/A N/A N/A self output_charset N/A self input_charset N/A encoded_header_len N/A N/A self s N/A N/A N/A Return the length of the encoded header string. N/A cset N/A N/A self get_output_charset N/A N/A N/A self header_encoding BASE64 N/A N/A N/A N/A N/A N/A N/A email base64mime base64_len s N/A len cset MISC_LEN N/A N/A N/A N/A self header_encoding QP N/A N/A N/A N/A N/A N/A N/A email quoprimime header_quopri_len s N/A len cset MISC_LEN N/A N/A N/A N/A self header_encoding SHORTEST N/A N/A lenb64 N/A N/A N/A email base64mime base64_len s N/A lenqp N/A N/A N/A email quoprimime header_quopri_len s N/A N/A N/A N/A min lenb64 lenqp N/A len cset MISC_LEN N/A N/A N/A len s N/A header_encode N/A N/A self s convert N/A False N/A N/A Header-encode a string, optionally converting it to output_charset.

        If convert is True, the string will be converted from the input
        charset to the output charset automatically.  This is not useful for
        multibyte character sets, which have line length issues (multibyte
        characters must be split on a character, not a byte boundary); use the
        high-level Header class to deal with these issues.  convert defaults
        to False.

        The type of encoding (base64 or quoted-printable) will be based on
        self.header_encoding.
         N/A cset N/A N/A self get_output_charset N/A convert N/A N/A s N/A N/A self convert s N/A N/A N/A self header_encoding BASE64 N/A N/A N/A N/A N/A email base64mime header_encode s cset N/A N/A N/A N/A self header_encoding QP N/A N/A N/A N/A N/A email quoprimime header_encode s cset maxlinelen None N/A N/A N/A N/A self header_encoding SHORTEST N/A N/A lenb64 N/A N/A N/A email base64mime base64_len s N/A lenqp N/A N/A N/A email quoprimime header_quopri_len s N/A N/A lenb64 lenqp N/A N/A N/A N/A N/A email base64mime header_encode s cset N/A N/A N/A N/A N/A email quoprimime header_encode s cset maxlinelen None N/A N/A s N/A body_encode N/A N/A self s convert N/A True N/A N/A Body-encode a string and convert it to output_charset.

        If convert is True (the default), the string will be converted from
        the input charset to output charset automatically.  Unlike
        header_encode(), there are no issues with byte boundaries and
        multibyte charsets in email bodies, so this is usually pretty safe.

        The type of encoding (base64 or quoted-printable) will be based on
        self.body_encoding.
         N/A convert N/A N/A s N/A N/A self convert s N/A N/A N/A self body_encoding BASE64 N/A N/A N/A N/A N/A email base64mime body_encode s N/A N/A N/A N/A self body_encoding QP N/A N/A N/A N/A N/A email quoprimime body_encode s N/A N/A s N/A N/A