-í
ë¶<c       s7    d  Z    d k Z  d k Z 
 d k l Z l Z l Z  d k l Z  d k l Z	  d k l
 Z
 l Z l Z  d k l Z  d k Z  d k l Z l Z  d Z  d	 Z  d
 „  Z   d „  Z / d „  Z 7 e i d e i e i Bƒ Z B d „  Z a d d d „ Z n e d d „ Z  d S(   s   Miscellaneous utilities.
N(   s   unquotes   quotes	   parseaddr(   s   dump_address_pair(   s   AddrlistClass(   s   parsedate_tzs	   parsedates	   mktime_tz(   s   decodestring(   s   _bencodes   _qencodes   , u    c    s     |  Sd  S(   N(   s   s(   s   s(    (    s!   /usr/lib/python2.2/email/Utils.pys	   _identity s   c    sŠ     ! |  o " |  Sn % |  o & |  Sn ' |  d d j } ( t i |  ƒ } ) | o | d d j o * | d  Sn + | Sd  S(   Niÿÿÿÿs   
(   s   ss
   hasnewlines   base64s   decodestrings   value(   s   ss   values
   hasnewline(    (    s!   /usr/lib/python2.2/email/Utils.pys   _bdecode  s   c    s8   / 0 1 t  i |  ƒ } 2 t | ƒ } 3 | i ƒ  Sd S(   s7   Return a list of (REALNAME, EMAIL) for each fieldvalue.N(   s
   COMMASPACEs   joins   fieldvaluess   alls   _AddrlistClasss   as   getaddrlist(   s   fieldvaluess   as   all(    (    s!   /usr/lib/python2.2/email/Utils.pys   getaddresses/ s   s_  
  =\?                   # literal =?
  (?P<charset>[^?]*?)   # non-greedy up to the next ? is the charset
  \?                    # literal ?
  (?P<encoding>[qb])    # either a "q" or a "b", case insensitive
  \?                    # literal ?
  (?P<atom>.*?)         # non-greedy up to the next ?= is the atom
  \?=                   # literal ?=
  c    s4  B C D g  } E t i |  d ƒ } F xö F | oë H t | ƒ d j  o I | i | ƒ J Pn L | i | d ƒ M | d } N | d i	 ƒ  } O | d } Q t i | d ƒ } S | d j o T t } n' U | d j o V t } n
 X t } Z | i t | | ƒ | ƒ ƒ q* W] t i | ƒ Sd	 S(
   sC   Return a decoded string according to RFC 2047, as a unicode string.i   i   i    i   i   i   s   qs   bN(   s   rtns   ecres   splits   ss   partss   lens   extends   appends   charsets   lowers   encodings   atoms   _qdecodes   funcs   _bdecodes	   _identitys   unicodes   UEMPTYSTRINGs   join(   s   ss   encodings   rtns   partss   funcs   atoms   charset(    (    s!   /usr/lib/python2.2/email/Utils.pys   decodeB s(   	 
	$s
   iso-8859-1s   qc    s‰   a b c | i ƒ  } d | d j o e t |  ƒ } n4 f | d j o g t |  ƒ } n i t d | ‚ j d | i ƒ  | | f Sd S(   s&   Encode a string according to RFC 2047.s   qs   bs   Illegal encoding code: s   =?%s?%s?%s?=N(   s   encodings   lowers   _qencodes   ss   estrs   _bencodes
   ValueErrors   charset(   s   ss   charsets   encodings   estr(    (    s!   /usr/lib/python2.2/email/Utils.pys   encodea s   i    c    s~  n y | |  t j o } t i ƒ  }  n ~ | o¨  t i |  ƒ } ‚ t i o | d o ƒ t i } n … t i } † t	 t
 | ƒ d ƒ \ } } ‰ | d j o Š d } n
 Œ d }  d | | | d f } n  t i |  ƒ } ‘ d } ’ d	 d
 d d d d d d g | d | d d d d d d d d d d d d d g | d d | d | d  | d! | d" | f Sd# S($   s²  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.
    iÿÿÿÿi  i    s   -s   +s
   %s%02d%02di<   s   -0000s"   %s, %02d %s %04d %02d:%02d:%02d %ss   Mons   Tues   Weds   Thus   Fris   Sats   Suni   i   s   Jans   Febs   Mars   Aprs   Mays   Juns   Juls   Augs   Seps   Octs   Novs   Deci   i   i   i   N(   s   timevals   Nones   times	   localtimes   nows   daylights   altzones   offsets   timezones   divmods   abss   hourss   minutess   signs   zones   gmtime(   s   timevals	   localtimes   zones   signs   hourss   offsets   nows   minutes(    (    s!   /usr/lib/python2.2/email/Utils.pys
   formatdaten s    
		(!   s   __doc__s   times   res   rfc822s   unquotes   quotes	   parseaddrs   dump_address_pairs   AddrlistClasss   _AddrlistClasss   parsedate_tzs	   parsedates	   mktime_tzs   quopris   decodestrings   _qdecodes   base64s   Encoderss   _bencodes   _qencodes
   COMMASPACEs   UEMPTYSTRINGs	   _identitys   _bdecodes   getaddressess   compiles   VERBOSEs
   IGNORECASEs   ecres   decodes   encodes   Nones
   formatdate(   s   unquotes	   parsedates   _qdecodes   UEMPTYSTRINGs   getaddressess   quotes   _qencodes
   formatdates	   _identitys   parsedate_tzs	   parseaddrs   ecres   _bdecodes   dump_address_pairs   base64s   _AddrlistClasss	   mktime_tzs   decodes   res   times   encodes   _bencodes
   COMMASPACE(    (    s!   /usr/lib/python2.2/email/Utils.pys   ? s$   		