email.charset.add_charset()

email.charset.add_charset(charset, header_enc=None, body_enc=None, output_charset=None) Add character 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 quoted-printable or base64 encoding, or None for no encoding. SHORTEST is only valid for header_enc. The default is None fo

email.charset.Charset

class email.charset.Charset(input_charset=DEFAULT_CHARSET) 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 message in an RFC-compliant way. Certain character s

email.charset.Charset.body_encode()

body_encode(string) Body-encode the string string. The type of encoding (base64 or quoted-printable) will be based on the body_encoding attribute.

email.charset.Charset.body_encoding

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.

email.charset.Charset.get_body_encoding()

get_body_encoding() 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 the string quoted-printable if body_encoding is QP, returns the string base64 if body_encoding is B

email.charset.add_alias()

email.charset.add_alias(alias, canonical) 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. The global charset alias registry is kept in the module global dictionary ALIASES.

email

Source code: Lib/email/__init__.py The email package is a library for managing email messages, including MIME and other RFC 2822-based message documents. It is specifically not designed to do any sending of email messages to SMTP (RFC 2821), NNTP, or other servers; those are functions of modules such as smtplib and nntplib. The email package attempts to be as RFC-compliant as possible, supporting in addition to RFC 2822, such MIME-related RFCs as RFC 2045, RFC 2046, RFC 2047, and RFC 2231. The

dummy_threading

Source code: Lib/dummy_threading.py This module provides a duplicate interface to the threading module. It is meant to be imported when the _thread module is not provided on a platform. Suggested usage is: try: import threading except ImportError: import dummy_threading as threading Be careful to not use this module where deadlock might occur from a thread being created that blocks waiting for another thread to be created. This often occurs with blocking I/O.

Ellipsis

Ellipsis The same as .... Special value used mostly in conjunction with extended slicing syntax for user-defined container data types.

doctest.UnexpectedException.test

UnexpectedException.test The DocTest object that was being run when the example failed.