| | |
- StringIO(...)
- StringIO([s]) -- Return a StringIO-like stream for reading or writing
- decode(s)
- Return a decoded string according to RFC 2047, as a unicode string.
NOTE: This function is deprecated. Use Header.decode_header() instead.
- decode_params(params)
- Decode parameters list according to RFC 2231.
params is a sequence of 2-tuples containing (content type, string value).
- decode_rfc2231(s)
- Decode string according to RFC 2231
- dump_address_pair(pair)
- # For backwards compatibility
- encode(s, charset='iso-8859-1', encoding='q')
- Encode a string according to RFC 2047.
- encode_rfc2231(s, charset=None, language=None)
- Encode string according to RFC 2231.
If neither charset nor language is given, then s is returned as-is. If
charset is given but not language, the string is encoded using the empty
string for language.
- fix_eols(s)
- Replace all line-ending characters with
.
- formataddr(pair)
- The inverse of parseaddr(), this takes a 2-tuple of the form
(realname, email_address) and returns the string value suitable
for an RFC 2822 From, To or Cc header.
If the first element of pair is false, then the second element is
returned unmodified.
- formatdate(timeval=None, localtime=False)
- Returns a date string as specified by RFC 2822, e.g.:
Fri, 09 Nov 2001 01:08:47 -0000
Optional timeval if given is a floating point time value as accepted by
gmtime() and localtime(), otherwise the current time is used.
Optional localtime is a flag that when True, interprets timeval, and
returns a date relative to the local timezone instead of UTC, properly
taking daylight savings time into account.
- getaddresses(fieldvalues)
- Return a list of (REALNAME, EMAIL) for each fieldvalue.
- make_msgid(idstring=None)
- Returns a string suitable for RFC 2822 compliant Message-ID, e.g:
<20020201195627.33539.96671@nightshade.la.mastaler.com>
Optional idstring if given is a string used to strengthen the
uniqueness of the message id.
- parseaddr(addr)
- parsedate(data)
- # These functions are in the standalone mimelib version only because they've
# subsequently been fixed in the latest Python versions. We use this to worm
# around broken older Pythons.
- parsedate_tz(data)
- unquote(str)
- Remove quotes from a string.
|