™N
¡´ 7c       st    d  Z    k Z k Z k Z k Z k Z  d Z  d Z  d Z  d d f Z	  h  d d f d <d	 f d
 <d	 d d d f d <d f d <d f d <d f d <d d f d <d d f d <d d f d <d f d <d f d <d d f d <d	 f d <d	 d d d f d <d d f d <d	 d d d f d <d d f d <d f d <d d f d <d d f d <d f d <d d f d <d f d <d d f d  <Z
 8 e i d! ƒ Z 9 e i d" ƒ Z : e i d# ƒ Z ? e i d$ ƒ Z @ e i d% ƒ Z A e i d& ƒ Z B e i d' ƒ Z F d f  d( „  ƒ  YZ “h  d) d* <d+ d, <d- d. <d/ d0 <d1 d2 <d3 d4 <d5 d6 <d7 d8 <d9 d: <d; d< <d= d> <d? d@ <Z –dA „  Z ¾dB „  Z ËdC „  Z ÖdD „  Z ñe o
 e dE j odók Z ôe i ƒ  Z õe i ƒ  Z ÷dF e e f f dG dH f f dI dH dJ f f d dK f f dL dK e e dM f f dN dK f f dO f  f dP d dQ f f dR dS dT f f dU dS dV dW f f dX f  f dY f  f f Z  dN f  f dZ d[ f f dP d dQ f f dO f  f dZ d\ f f d] f  f f Z! d^ „  Z" d/ Z e ƒ  Z# d_ e# i$ GHx) e  d r \ Z% Z& e" e% e& ƒ qeWxL e" d` da db f ƒ d r0 Z' e i( e' ƒ d) Z) e" dc e) f ƒ q£WxŒ e! d r \ Z% Z&  e" e% e& ƒ Z* "e% e& f dP d dQ f f j o
 #qæn %e i( e* d ƒ d) Z+ &e" dP d dd e+ f ƒ qæWn de S(f   sÚ   IMAP4 client.

Based on RFC 2060.

Author: Piers Lauder <piers@cs.su.oz.au> December 1997.

Public class:		IMAP4
Public variable:	Debug
Public functions:	Internaldate2tuple
			Int2AP
			ParseFlags
			Time2Internaldate
s   
i    i�   s	   IMAP4REV1s   IMAP4s   AUTHs   SELECTEDs   APPENDs   NONAUTHs   AUTHENTICATEs   LOGOUTs
   CAPABILITYs   CHECKs   CLOSEs   COPYs   CREATEs   DELETEs   EXAMINEs   EXPUNGEs   FETCHs   LISTs   LOGINs   LSUBs   NOOPs   RENAMEs   SEARCHs   SELECTs   STATUSs   STOREs	   SUBSCRIBEs   UIDs   UNSUBSCRIBEs   \+ (?P<data>.*)s   .*FLAGS \((?P<flags>[^\)]*)\)sÔ   .*INTERNALDATE "(?P<day>[ 123][0-9])-(?P<mon>[A-Z][a-z][a-z])-(?P<year>[0-9][0-9][0-9][0-9]) (?P<hour>[0-9][0-9]):(?P<min>[0-9][0-9]):(?P<sec>[0-9][0-9]) (?P<zonen>[-+])(?P<zoneh>[0-9][0-9])(?P<zonem>[0-9][0-9])"s   (?P<data>.*) {(?P<size>\d+)}$s)   \[(?P<type>[A-Z-]+)( (?P<data>[^\]]*))?\]s!   \* (?P<type>[A-Z-]+) (?P<data>.*)s3   \* (?P<data>\d+) (?P<type>[A-Z-]+)( (?P<data2>.*))?c      s   F d  Z  W Y d e f d „  ƒ  YZ Z d e f d „  ƒ  YZ ] d e d „ Z — d „  Z ¡ d „  Z ³ d	 „  Z » d
 „  Z	 Ã d „  Z
 Ó d „  Z Û d „  Z ã d „  Z ë d „  Z ù d „  Z d d d „ Z d „  Z  d „  Z 1d d d „ Z =d „  Z Md „  Z Ud „  Z ]d „  Z kd e d „ Z …d „  Z ‘d „  Z ›d „  Z £d  „  Z ¶d! „  Z ¾e e d" „ Z Íd# „  Z  Øe e e e d$ „ Z! d% „  Z" d& „  Z# Zd' „  Z$ dd( „  Z% qd) „  Z& |d* „  Z' „e e d+ „ Z( ‰d, „  Z) RS(-   sE  IMAP4 client class.

	Instantiate with: IMAP4([host[, port]])

		host - host's name (default: localhost);
		port - port number (default: standard IMAP4 port).

	All IMAP4rev1 commands are supported by methods of the same
	name (in lower-case). Each command returns a tuple: (type, [data, ...])
	where 'type' is usually 'OK' or 'NO', and 'data' is either the
	text from the tagged response, or untagged results from command.

	Errors raise the exception class <instance>.error("<reason>").
	IMAP4 server errors raise <instance>.abort("<reason>"),
	which is a sub-class of 'error'.
	s   errorc      s   Y Y RS(   N(    (    s#   /mit/gnome/lib/python1.5/imaplib.pys   errorY s    s   abortc      s   Z Z RS(   N(    (    s#   /mit/gnome/lib/python1.5/imaplib.pys   abortZ s    c    s§  ] ^ | |  _  _ | |  _ ` t |  _ a d |  _ b h  |  _ c h  |  _ d d |  _ e d |  _	 i t
 i
 t
 i t
 i ƒ |  _ j |  i i |  i  |  i ƒ k |  i i d ƒ |  _ p t t i ƒ  d ƒ |  _ q t i d |  i d ƒ |  _ x t o |  i d j o y d	 |  i GHn { |  i ƒ  |  _ | |  i i d
 ƒ o } d |  _ n< ~ |  i i d ƒ o  d |  _ n ‚ |  i |  i ƒ ‚ „ d } … |  i | ƒ † |  i i | ƒ o ‡ |  i d ƒ ‚ n ˆ t t  i! |  i | d ƒ ƒ |  _" Š t o |  i d j o ‹ d |  i" GHn � t# |  _$ Ž xA t% d Ž r4 } � | |  i" j o
 � qDn ‘ | |  _$ ’ PqDW“ |  i$ o ” |  i d ƒ ‚ n d  S(   Ns   LOGOUTs    i    s   ri }  s   (?P<tag>s"   \d+) (?P<type>[A-Z]+) (?P<data>.*)i   s   	new IMAP4 connection, tag=%ss   PREAUTHs   AUTHs   OKs   NONAUTHs
   CAPABILITYs"   no CAPABILITY response from serveri   s   	CAPABILITIES: %ss   server not IMAP4 compliant('   s   hosts   selfs   ports   Debugs   debugs   states   tagged_commandss   untagged_responsess   continuation_responses   tagnums   sockets   AF_INETs   SOCK_STREAMs   socks   connects   makefiles   files   Int2APs   whrandoms   randoms   tagpres   res   compiles   tagres	   __debug__s   _get_responses   welcomes   has_keys   errors   caps   _simple_commands   tuples   strings   splits   capabilitiess   Nones   PROTOCOL_VERSIONs   AllowedVersionss   version(   s   selfs   hosts   ports   caps   versions#   /mit/gnome/lib/python1.5/imaplib.pys   __init__] sJ    	' 	
s    c    sN   — ˜ ™ t  i | ƒ o š t d t i | ƒ ƒ Sn › t d | ƒ ‚ d S(   s9   Allow UPPERCASE variants of all following IMAP4 commands.s   self.%ss   Unknown IMAP4 command: '%s'N(   s   Commandss   has_keys   attrs   evals   strings   lowers   AttributeError(   s   selfs   attrs#   /mit/gnome/lib/python1.5/imaplib.pys   __getattr__— s   c    sŽ   ¡ ¥ ¦ d } § | o ¨ d | } n
 ª t } « | o ¬ t | ƒ } n
 ® t } ¯ |  i | | | | | ƒ } ° |  i
 | | ƒ Sd S(   sl   Append message to named mailbox.

		(typ, [data]) = <instance>.append(mailbox, flags, date_time, message)
		s   APPENDs   (%s)N(   s   names   flagss   Nones	   date_times   Time2Internaldates   selfs   _commands   mailboxs   messages   tags   _command_complete(   s   selfs   mailboxs   flagss	   date_times   messages   names   tags#   /mit/gnome/lib/python1.5/imaplib.pys   append¡ s   	
	
	c    s   ³ · ¸ |  i d ƒ ‚ d S(   sH   Authenticate command - requires response processing.

		UNIMPLEMENTED
		s   UNIMPLEMENTEDN(   s   selfs   error(   s   selfs   funcs#   /mit/gnome/lib/python1.5/imaplib.pys   authenticate³ s   c    s   » ¿ À |  i d ƒ Sd S(   sF   Checkpoint mailbox on server.

		(typ, [data]) = <instance>.check()
		s   CHECKN(   s   selfs   _simple_command(   s   selfs#   /mit/gnome/lib/python1.5/imaplib.pys   check» s   c    s�   Ã Ê Ë zT Ì y Ì |  i d ƒ \ } } Wn. Í t j
 o Í t t g f \ } } n XWd Î Ï d |  _ XÐ | | f Sd S(   s´   Close currently selected mailbox.

		Deleted messages are removed from writable mailbox.
		This is the recommended command before 'LOGOUT'.

		(typ, [data]) = <instance>.close()
		s   CLOSENs   AUTH(   s   selfs   _simple_commands   typs   dats   EOFErrors   Nones   state(   s   selfs   typs   dats#   /mit/gnome/lib/python1.5/imaplib.pys   closeÃ s     !c    s    Ó × Ø |  i d | | ƒ Sd S(   sv   Copy 'message_set' messages onto end of 'new_mailbox'.

		(typ, [data]) = <instance>.copy(message_set, new_mailbox)
		s   COPYN(   s   selfs   _simple_commands   message_sets   new_mailbox(   s   selfs   message_sets   new_mailboxs#   /mit/gnome/lib/python1.5/imaplib.pys   copyÓ s   c    s   Û ß à |  i d | ƒ Sd S(   sD   Create new mailbox.

		(typ, [data]) = <instance>.create(mailbox)
		s   CREATEN(   s   selfs   _simple_commands   mailbox(   s   selfs   mailboxs#   /mit/gnome/lib/python1.5/imaplib.pys   createÛ s   c    s   ã ç è |  i d | ƒ Sd S(   sD   Delete old mailbox.

		(typ, [data]) = <instance>.delete(mailbox)
		s   DELETEN(   s   selfs   _simple_commands   mailbox(   s   selfs   mailboxs#   /mit/gnome/lib/python1.5/imaplib.pys   deleteã s   c    s>   ë ó ô d } õ |  i | ƒ \ } } ö |  i | | ƒ Sd S(   sß   Permanently remove deleted items from selected mailbox.

		Generates 'EXPUNGE' response for each deleted message.

		(typ, [data]) = <instance>.expunge()

		'data' is list of 'EXPUNGE'd message numbers in order received.
		s   EXPUNGEN(   s   names   selfs   _simple_commands   typs   dats   _untagged_response(   s   selfs   names   typs   dats#   /mit/gnome/lib/python1.5/imaplib.pys   expungeë s   	c    sD   ù ÿ  d } |  i | | | ƒ \ } } |  i | | ƒ Sd S(   sš   Fetch (parts of) messages.

		(typ, [data, ...]) = <instance>.fetch(message_set, message_parts)

		'data' are tuples of message part envelope and data.
		s   FETCHN(   s   names   selfs   _simple_commands   message_sets   message_partss   typs   dats   _untagged_response(   s   selfs   message_sets   message_partss   names   typs   dats#   /mit/gnome/lib/python1.5/imaplib.pys   fetchù s   	c    sD   d } |  i | | | ƒ \ } } |  i | | ƒ Sd S(   s™   List mailbox names in directory matching pattern.

		(typ, [data]) = <instance>.list(directory='""', pattern='*')

		'data' is list of LIST responses.
		s   LISTN(   s   names   selfs   _simple_commands	   directorys   patterns   typs   dats   _untagged_response(   s   selfs	   directorys   patterns   names   typs   dats#   /mit/gnome/lib/python1.5/imaplib.pys   lists   	s   ""s   *c    s¢   d |  i j o d |  i j o |  i d ƒ ‚ n |  i d | | ƒ \ } } | d j o |  i | ƒ ‚ n d |  _ | | f Sd S(   s_   Identify client using plaintext password.

		(typ, [data]) = <instance>.list(user, password)
		s
   AUTH=LOGINs
   AUTH-LOGINs(   server doesn't allow LOGIN authorisations   LOGINs   OKs   AUTHN(	   s   selfs   capabilitiess   errors   _simple_commands   users   passwords   typs   dats   state(   s   selfs   users   passwords   typs   dats#   /mit/gnome/lib/python1.5/imaplib.pys   logins   %c    sÁ    &'d |  _ (y (|  i d ƒ \ } } Wn. )t j
 o )t t g f \ } } n X*|  i i ƒ  +|  i	 i ƒ  ,|  i
 i d ƒ o -d |  i
 d f Sn .| | f Sd S(   sj   Shutdown connection to server.

		(typ, [data]) = <instance>.logout()

		Returns server 'BYE' response.
		s   LOGOUTs   BYEN(   s   selfs   states   _simple_commands   typs   dats   EOFErrors   Nones   files   closes   socks   untagged_responsess   has_key(   s   selfs   typs   dats#   /mit/gnome/lib/python1.5/imaplib.pys   logout s     c    sD   178d } 9|  i | | | ƒ \ } } :|  i | | ƒ Sd S(   s¾   List 'subscribed' mailbox names in directory matching pattern.

		(typ, [data, ...]) = <instance>.lsub(directory='""', pattern='*')

		'data' are tuples of message part envelope and data.
		s   LSUBN(   s   names   selfs   _simple_commands	   directorys   patterns   typs   dats   _untagged_response(   s   selfs	   directorys   patterns   names   typs   dats#   /mit/gnome/lib/python1.5/imaplib.pys   lsub1s   	c    sy   =DEd } F|  i d | ƒ \ } } G| d o H| | f Sn I|  i d ƒ \ } } J|  i | | ƒ Sd S(   s�   Prompt server for an update.

		(typ, [data]) = <instance>.recent()

		'data' is None if no new messages,
		else value of RECENT response.
		s   RECENTs   OKi   s   NOOPN(   s   names   selfs   _untagged_responses   typs   dats   _simple_command(   s   selfs   names   typs   dats#   /mit/gnome/lib/python1.5/imaplib.pys   recent=s   	c    s    MQR|  i d | | ƒ Sd S(   s]   Rename old mailbox name to new.

		(typ, data) = <instance>.rename(oldmailbox, newmailbox)
		s   RENAMEN(   s   selfs   _simple_commands
   oldmailboxs
   newmailbox(   s   selfs
   oldmailboxs
   newmailboxs#   /mit/gnome/lib/python1.5/imaplib.pys   renameMs   c    s)   UYZ| |  i i | t g ƒ f Sd S(   sf   Return data for response 'code' if received, or None.

		(code, [data]) = <instance>.response(code)
		N(   s   codes   selfs   untagged_responsess   gets   None(   s   selfs   codes#   /mit/gnome/lib/python1.5/imaplib.pys   responseUs   c    s_   ]cdd } e| o fd | } n g|  i | | | ƒ \ } } h|  i | | ƒ Sd S(   sŸ   Search mailbox for matching messages.

		(typ, [data]) = <instance>.search(charset, criteria)

		'data' is space separated list of matching message numbers.
		s   SEARCHs   CHARSET N(   s   names   charsets   selfs   _simple_commands   criterias   typs   dats   _untagged_response(   s   selfs   charsets   criterias   names   typs   dats#   /mit/gnome/lib/python1.5/imaplib.pys   search]s   	
c    s#  kqtx@ d d f d tr- } u|  i i | ƒ o v|  i | =n q Ww| o xd } n
 zd } {|  i | | ƒ \ } } || d j o }d |  _
 n! ~| d j o d	 |  _
 n €| o |  i i d ƒ o �|  i d
 | ƒ ‚ n ‚| |  i i d t g ƒ f Sd S(   s˜   Select a mailbox.

		(typ, [data]) = <instance>.select(mailbox='INBOX', readonly=None)

		'data' is count of messages in mailbox ('EXISTS' response).
		s   EXISTSs
   READ-WRITEi    s   EXAMINEs   SELECTs   OKs   SELECTEDs   NOs   AUTHs   %s is not writableN(   s   rs   selfs   untagged_responsess   has_keys   readonlys   names   _simple_commands   mailboxs   typs   dats   states   errors   gets   None(   s   selfs   mailboxs   readonlys   rs   names   typs   dats#   /mit/gnome/lib/python1.5/imaplib.pys   selectks     	
	s   INBOXc    sq   …‰Šd } ‹|  i d j o Œ|  i d | ƒ ‚ n �|  i | | | ƒ \ } } Ž|  i	 | | ƒ Sd S(   sd   Request named status conditions for mailbox.

		(typ, [data]) = <instance>.status(mailbox, names)
		s   STATUSs   IMAP4s?   %s unimplemented in IMAP4 (obtain IMAP4rev1 server, or re-code)N(
   s   names   selfs   PROTOCOL_VERSIONs   errors   _simple_commands   mailboxs   namess   typs   dats   _untagged_response(   s   selfs   mailboxs   namess   names   typs   dats#   /mit/gnome/lib/python1.5/imaplib.pys   status…s   	c    sN   ‘•–d | | f } —|  i d | | ƒ \ } } ˜|  i | d ƒ Sd S(   sy   Alters flag dispositions for messages in mailbox.

		(typ, [data]) = <instance>.store(message_set, command, flag_list)
		s   %s %ss   STOREs   FETCHN(   s   commands	   flag_lists   selfs   _simple_commands   message_sets   typs   dats   _untagged_response(   s   selfs   message_sets   commands	   flag_lists   typs   dats#   /mit/gnome/lib/python1.5/imaplib.pys   store‘s   c    s   ›Ÿ |  i d | ƒ Sd S(   sM   Subscribe to new mailbox.

		(typ, [data]) = <instance>.subscribe(mailbox)
		s	   SUBSCRIBEN(   s   selfs   _simple_commands   mailbox(   s   selfs   mailboxs#   /mit/gnome/lib/python1.5/imaplib.pys	   subscribe›s   c    s›   £ª«d } ¬|  i d | | ƒ \ } } ­| d j o ®d } n
 °d } ±|  i | | ƒ \ } } ²| d o ²| } n ³| | f Sd S(   s¸   Execute "command args" with messages identified by UID,
			rather than message number.

		(typ, [data]) = <instance>.uid(command, args)

		Returns response appropriate to 'command'.
		s   UIDs   SEARCHs   FETCHi   N(	   s   names   selfs   _simple_commands   commands   argss   typs   dats   _untagged_responses   dat2(   s   selfs   commands   argss   names   typs   dats   dat2s#   /mit/gnome/lib/python1.5/imaplib.pys   uid£s   		 c    s   ¶º»|  i d | ƒ Sd S(   sS   Unsubscribe from old mailbox.

		(typ, [data]) = <instance>.unsubscribe(mailbox)
		s   UNSUBSCRIBEN(   s   selfs   _simple_commands   mailbox(   s   selfs   mailboxs#   /mit/gnome/lib/python1.5/imaplib.pys   unsubscribe¶s   c    s_   ¾ÃÄ| d d j p | |  i j o Å|  i d | ƒ ‚ n Æ|  i | | | ƒ Sd S(   s�   Allow simple extension commands
			notified by server in CAPABILITY response.

		(typ, [data]) = <instance>.xatom(name, arg1=None, arg2=None)
		i    s   Xs   unknown extension command: %sN(   s   names   selfs   capabilitiess   errors   _simple_commands   arg1s   arg2(   s   selfs   names   arg1s   arg2s#   /mit/gnome/lib/python1.5/imaplib.pys   xatom¾s   %c    s|   ÍÏ|  i i | ƒ o Ð|  i | i | ƒ n Ò| g |  i | <Ôt o |  i d j o Õd | | f GHn d  S(   Ni   s"   	untagged_responses[%s] += %.20s..(   s   selfs   untagged_responsess   has_keys   typs   appends   dats	   __debug__s   debug(   s   selfs   typs   dats#   /mit/gnome/lib/python1.5/imaplib.pys   _append_untaggedÍs
   c 
   sE  ØÚ|  i t | j o# Û|  i d | |  i f ƒ ‚ n Þ|  i ƒ  } ßd | | f } àxC | | | f d àr- } á| t j	 o ád | | f } n qt Wâ| t j	 o ãd | t | ƒ f } n åy! æ|  i i d | t f ƒ Wn1 çt i j
 o }	 è|  i d |	 ƒ ‚ n Xêt o |  i d j o ëd | GHn í| t j o î| Sn òx1 ò|  i ƒ  o  ó|  i | o ô| Sn qxWøt o |  i d j o ùd	 t | ƒ GHn ûy* ü|  i i | ƒ ý|  i i t ƒ Wn1 þt i j
 o }	 ÿ|  i d |	 ƒ ‚ n X| Sd  S(
   Ns   command %s illegal in state %ss   %s %si    s   %s {%s}s   %s%ss   socket error: %si   s   	> %ss   	write literal size %s(   s   selfs   states   Commandss   names   errors   _new_tags   tags   datas   dat1s   dat2s   dat3s   ds   Nones   literals   lens   socks   sends   CRLFs   sockets   vals   aborts	   __debug__s   debugs   _get_responses   tagged_commands(
   s   selfs   names   dat1s   dat2s   dat3s   literals   tags   datas   ds   vals#   /mit/gnome/lib/python1.5/imaplib.pys   _commandØs<   # 	 ! c    s  y |  i | ƒ \ } } Wnm |  i j
 o% } |  i d | | f ƒ ‚ n8 	|  i j
 o% } 
|  i d | | f ƒ ‚ n X|  i	 i
 d ƒ o
 | d j o" |  i |  i	 d d ƒ ‚ n | d j o# |  i d | | | f ƒ ‚ n | | f Sd  S(   Ns   command: %s => %ss   BYEs   LOGOUTi   s   BADs   %s command error: %s %s(   s   selfs   _get_tagged_responses   tags   typs   datas   aborts   vals   names   errors   untagged_responsess   has_key(   s   selfs   names   tags   typs   datas   vals#   /mit/gnome/lib/python1.5/imaplib.pys   _command_completes    !#"#c    sã  |  i ƒ  d  } |  i |  i | ƒ o�  |  i i d ƒ } !|  i i	 | ƒ o "|  i
 d | ƒ ‚ n $|  i i d ƒ } %|  i i d ƒ } &| | g f |  i | <nÁ(t } ,|  i t | ƒ o3 -|  i t | ƒ o .|  i i d ƒ } n n 0|  i t j oS 3|  i t | ƒ o# 4|  i i d ƒ |  _ 5t Sn 7|  i
 d | ƒ ‚ n 9|  i i d ƒ } :|  i i d ƒ } ;| o ;| d | } n ?x¥ ?|  i t | ƒ oŽ Ct i |  i i d	 ƒ ƒ } Dt o |  i d
 j o Ed | GHn F|  i i | ƒ } J|  i | | | f ƒ N|  i ƒ  d  } qÅWP|  i | | ƒ T| d d d f j o |  i t | ƒ o/ U|  i |  i i d ƒ |  i i d ƒ ƒ n W| Sd  S(   Ni   s   tags   unexpected tagged response: %ss   types   datas   data2s   unexpected response: %ss    s   sizei   s   	read literal size %ss   OKs   NOs   BAD(   s   selfs	   _get_lines   resps   _matchs   tagres   mos   groups   tags   tagged_commandss   has_keys   aborts   typs   dats   Nones   dat2s   Untagged_responses   Untagged_statuss   Continuations   continuation_responses   Literals   strings   atois   sizes	   __debug__s   debugs   files   reads   datas   _append_untaggeds   Response_code(   s   selfs   resps   tags   typs   dats   dat2s   sizes   datas#   /mit/gnome/lib/python1.5/imaplib.pys   _get_responsesB   		
  ,/c    sa   Z\xT \d oI ]|  i | } ^| t j	 o _|  i | =`| Sn a|  i ƒ  q	 Wd  S(   Ni   (   s   selfs   tagged_commandss   tags   results   Nones   _get_response(   s   selfs   tags   results#   /mit/gnome/lib/python1.5/imaplib.pys   _get_tagged_responseZs    
c    sg   df|  i i ƒ  } g| o ht ‚ n lt o |  i d j o md | d  GHn n| Sd  S(   Ni   s   	< %si   (   s   selfs   files   readlines   lines   EOFErrors	   __debug__s   debug(   s   selfs   lines#   /mit/gnome/lib/python1.5/imaplib.pys	   _get_lineds   c    sy   qv| i | ƒ |  _ wt o |  i t j	 o |  i d j o# xd | i |  i i	 ƒ  f GHn y|  i t j	 Sd  S(   Ni   s   	matched r'%s' => %s(
   s   cres   matchs   ss   selfs   mos	   __debug__s   Nones   debugs   patterns   groups(   s   selfs   cres   ss#   /mit/gnome/lib/python1.5/imaplib.pys   _matchqs   *#c    sJ   |~d |  i |  i f } |  i d |  _ €t |  i | <�| Sd  S(   Ns   %s%si   (   s   selfs   tagpres   tagnums   tags   Nones   tagged_commands(   s   selfs   tags#   /mit/gnome/lib/python1.5/imaplib.pys   _new_tag|s   c    s)   „†|  i | |  i | | | ƒ ƒ Sd  S(   N(   s   selfs   _command_completes   names   _commands   dat1s   dat2(   s   selfs   names   dat1s   dat2s#   /mit/gnome/lib/python1.5/imaplib.pys   _simple_command„s   c    s\   ‰‹|  i i | ƒ o Œ| t g f Sn �|  i | } Ž|  i | =�| | f Sd  S(   N(   s   selfs   untagged_responsess   has_keys   names   typs   Nones   data(   s   selfs   typs   names   datas#   /mit/gnome/lib/python1.5/imaplib.pys   _untagged_response‰s
   (*   s   __doc__s	   Exceptions   errors   aborts
   IMAP4_PORTs   __init__s   __getattr__s   appends   authenticates   checks   closes   copys   creates   deletes   expunges   fetchs   lists   logins   logouts   lsubs   recents   renames   responses   searchs   Nones   selects   statuss   stores	   subscribes   uids   unsubscribes   xatoms   _append_untaggeds   _commands   _command_completes   _get_responses   _get_tagged_responses	   _get_lines   _matchs   _new_tags   _simple_commands   _untagged_response(    s#   /mit/gnome/lib/python1.5/imaplib.pys   IMAP4F sN   	:

,H
i   s   Jani   s   Febi   s   Mari   s   Apri   s   Mayi   s   Juni   s   Juli   s   Augi	   s   Sepi
   s   Octi   s   Novi   s   Decc 	 	  sl  –›�e  i |  ƒ } ž| o Ÿe Sn ¡e | i d ƒ } ¢| i d ƒ } ¤x= d d d d d d d	 f d
 ¤r } ¥d | | f d Uqw W©e
 d e d } ª| d j o «| } n ­e | e e e e d d d f	 } ¯e i | ƒ } ´e i | ƒ } µe i o	 | d o ¶| e i } n ¸| e i } ºe i | | ƒ Sd S(   sG   Convert IMAP4 INTERNALDATE to UT.

	Returns Python time module tuple.
	s   mons   zonens   days   years   hours   mins   secs   zonehs   zonemi    s    %s = string.atoi(mo.group('%s'))Ni<   s   -i   (   s   InternalDates   matchs   resps   mos   Nones   Mon2nums   groups   mons   zonens   names   zonehs   zonems   zones   years   days   hours   mins   secs   tts   times   mktimes   utcs	   localtimes   lts   daylights   altzones   timezone(	   s   resps   mos   mons   zonens   names   zones   tts   utcs   lts#   /mit/gnome/lib/python1.5/imaplib.pys   Internaldate2tuple–s&   ! 	'c    ss   ¾ÀÂd } d } Ãt t |  ƒ ƒ }  Äx8 Ä|  o- Åt |  d ƒ \ }  } Æ| | | } q0 WÇ| Sd S(   s-   Convert integer to A-P string representation.s    s   ABCDEFGHIJKLMNOPi   N(   s   vals   APs   ints   abss   nums   divmods   mod(   s   nums   vals   APs   mods#   /mit/gnome/lib/python1.5/imaplib.pys   Int2AP¾s    
c    sQ   ËÍÏt  i |  ƒ } Ð| o Ñf  Sn Ót t i | i d ƒ ƒ ƒ Sd S(   s-   Convert IMAP4 flags response to python tuple.s   flagsN(   s   Flagss   matchs   resps   mos   tuples   strings   splits   group(   s   resps   mos#   /mit/gnome/lib/python1.5/imaplib.pys
   ParseFlagsËs
   c    s+  ÖÛÝt  |  ƒ } Þ| t  d ƒ j o ßt i |  ƒ } nN à| t  f  ƒ j o á|  } n+ â| t  d ƒ j o ã|  Sn
 ät ‚ æt i d | ƒ } ç| d d j o èd | d } n ét i	 o	 | d o êt i
 } n ìt i } íd | d t | d	 d	 ƒ d Sd
 S(   ss   Convert 'date_time' to IMAP4 INTERNALDATE representation.

	Return string in form: '"DD-Mmm-YYYY HH:MM:SS +HHMM"'
	i   s    s   %d-%b-%Y %H:%M:%Si    s   0s    s   "s
    %+02d%02di<   N(   s   types	   date_times   dttypes   times	   localtimes   tts
   ValueErrors   strftimes   dts   daylights   altzones   zones   timezones   divmod(   s	   date_times   dttypes   tts   dts   zones#   /mit/gnome/lib/python1.5/imaplib.pys   Time2InternaldateÖs    	s   __main__s   logins   creates   /tmp/xxxs   renames   /tmp/yyys   /tmp/yyzs   appends   From: anon@x.y.z

data...s   selects   recents   uids   ALLs   fetchs   1s   (INTERNALDATE RFC822)s   stores   FLAGSs
   (\Deleted)s   expunges   closes   responses   UIDVALIDITYs   EXISTSs   logoutc    sH   t  t d |  ƒ | ƒ \ } } d |  | | | f GH| Sd  S(   Ns   M.%ss    %s %s
  => %s %s(   s   applys   evals   cmds   argss   typs   dat(   s   cmds   argss   typs   dats#   /mit/gnome/lib/python1.5/imaplib.pys   runs   "s   PROTOCOL_VERSION = %ss   lists   /tmp/s   yy%s   deletes8   %s (FLAGS INTERNALDATE RFC822.SIZE RFC822.HEADER RFC822)N(,   s   __doc__s   res   sockets   strings   times   whrandoms   CRLFs   Debugs
   IMAP4_PORTs   AllowedVersionss   Commandss   compiles   Continuations   Flagss   InternalDates   Literals   Response_codes   Untagged_responses   Untagged_statuss   IMAP4s   Mon2nums   Internaldate2tuples   Int2APs
   ParseFlagss   Time2Internaldates	   __debug__s   __name__s   getpasss   getusers   USERs   PASSWDs   Nones	   test_seq1s	   test_seq2s   runs   Ms   PROTOCOL_VERSIONs   cmds   argss   mls   splits   paths   dats   uid(    s#   /mit/gnome/lib/python1.5/imaplib.pys   ? s\   !			ÿf ÿ ÿ Ou(	«K		  	 "
