Trees | Indices | Help |
|
---|
|
Miscellaneous utilities.
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|
|||
COMMASPACE =
|
|||
EMPTYSTRING =
|
|||
UEMPTYSTRING =
|
|||
CRLF =
|
|||
TICK =
|
|||
specialsre = re.compile(r'
|
|||
escapesre = re.compile(r'
|
|||
ecre = re.compile(r'
|
|||
rfc2231_continuation = re.compile(r'^
|
Imports: os, re, time, base64, random, socket, urllib, warnings, StringIO, quote, _AddressList, mktime_tz, _parsedate, _parsedate_tz, _qdecode, _bencode, _qencode
|
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. |
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. Optional argument usegmt means that the timezone is written out as an ascii string, not numeric one (so "GMT" instead of "+0000"). This is needed for HTTP, and is only used when localtime==False. |
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. |
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. |
Decode parameters list according to RFC 2231. params is a sequence of 2-tuples containing (param name, string value). |
|
ecre
|
rfc2231_continuation
|
Trees | Indices | Help |
|
---|
Generated by Epydoc 3.0.1 on Fri Jun 13 23:35:50 2008 | http://epydoc.sourceforge.net |