config root man

Current Path : /usr/local/lib/python2.5/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/local/lib/python2.5/imaplib.pyc

hRc@sVdZdZddkZddkZddkZddkZddkZddkZddkZdddddd	d
gZ	dZ
dZd
ZdZ
ddfZhddfd<dfd<ddddfd<dfd<dfd<dfd<ddfd<ddfd<ddfd<ddfd<dfd<dfd<ddfd <ddfd!<ddfd"<ddfd#<ddfd$<ddfd%<dfd&<ddddfd<ddfd'<ddfd(<ddddfd)<dfd*<dfd+<ddfd,<dfd-<ddfd.<ddfd/<ddfd0<ddfd1<dfd2<ddfd3<dfd4<ddfd5<dfd6<dfd7<ddfd8<Zeid9Zeid:Zeid;Zeid<Zeid=Zeid>Zeid?Zeid@ZdfdAYZdefdBYZdefdCYZdDfdEYZhdFdG<dHdI<dJdK<dLdM<dNdO<dPdQ<dRdS<dTdU<dVdW<dXdY<dZd[<d\d]<Zd^Zd_Zd`Z daZ!e"dbjoddk#Z#ddk$Z$y#e#i#ei%dFdc\Z&Z'Wn*e#i(j
oZ)fff\Z&Z'nXe*Z+x]e&D]U\Z,Z)e,ddjoe-e)Zn-e,dejoe)Z+e'o
e+fZ'nnqWe'o
dffZ'ne'dZ.e$i/Z0e$i$dge0e.pdhfZ1dihe0dj<dkdl<Z2dme0e1ffdndoffdpdodqffddrffdsdre*e*e2ffdtdudvffdwdrffdxe*dydzffd{d|d}ffd~d|ddffdffdffdffdfffZ3dwffddffdd-dffddffdse*e*e*e2ffdffdfffZ4dZ5ye+oee+Z6n
ee.Z6e6i7djoe3dFZ3ne6i8de6i9e6i8de6i:fx!e3D]\Z;Z'e5e;e'qWxie5dtddfD]RZ<ei=de<Z>e>oe>i?dFZ@ne<iAdZ@e5de@fq;Wxe4D]~\Z;Z'e5e;e'ZBe;e'fdd-dffjoqneBdiAZCeCoqne5dddeCddfqWdGHWn+dGHeodei%dGHnnXndS(sIMAP4 client.

Based on RFC 2060.

Public class:           IMAP4
Public variable:        Debug
Public functions:       Internaldate2tuple
                        Int2AP
                        ParseFlags
                        Time2Internaldate
s2.58iNtIMAP4t	IMAP4_SSLtIMAP4_streamtInternaldate2tupletInt2APt
ParseFlagstTime2Internaldates
iiit	IMAP4REV1tAUTHtSELECTEDtAPPENDtNONAUTHtAUTHENTICATEtLOGOUTt
CAPABILITYtCHECKtCLOSEtCOPYtCREATEtDELETEt	DELETEACLtEXAMINEtEXPUNGEtFETCHtGETACLt
GETANNOTATIONtGETQUOTAtGETQUOTAROOTtMYRIGHTStLISTtLOGINtLSUBt	NAMESPACEtNOOPtPARTIALt	PROXYAUTHtRENAMEtSEARCHtSELECTtSETACLt
SETANNOTATIONtSETQUOTAtSORTtSTATUStSTOREt	SUBSCRIBEtTHREADtUIDtUNSUBSCRIBEs\+( (?P<data>.*))?s.*FLAGS \((?P<flags>[^\)]*)\)s.*INTERNALDATE "(?P<day>[ 0123][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<size>\d+)}$s
\r\n|\r|\ns)\[(?P<type>[A-Z-]+)( (?P<data>[^\]]*))?\]s$\* (?P<type>[A-Z-]+)( (?P<data>.*))?s3\* (?P<data>\d+) (?P<type>[A-Z-]+)( (?P<data2>.*))?cBseZdZdefdYZdefdYZdefdYZeidZ	de
d	Zd
Zde
dZ
dZd
ZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!d Z"d!Z#d"d#d$Z$d%Z%d&Z&d'Z'd(Z(d"d#d)Z)d*Z*d+Z+d,Z,d-Z-d.Z.d/Z/d0Z0d1e1d2Z2d3Z3d4Z4d5Z5d6Z6d7Z7d8Z8d9Z9d:Z:d;Z;d<Z<d=Z=d>Z>d?Z?d@Z@dAZAdBZBdCZCdDZDdEZEdFZFdGZGdHZHdIZIdJZJdOdKZLdLZMdMZNdNZORS(PsIMAP4 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).

    All arguments to commands are converted to strings, except for
    AUTHENTICATE, and the last argument to APPEND which is passed as
    an IMAP4 literal.  If necessary (the string contains any
    non-printing characters or white-space and isn't enclosed with
    either parentheses or double quotes) each string is quoted.
    However, the 'password' argument to the LOGIN command is always
    quoted.  If you want to avoid having an argument string quoted
    (eg: the 'flags' argument to STORE) then enclose the string in
    parentheses (eg: "(\Deleted)").

    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. Each 'data'
    is either a string, or a tuple. If a tuple, then the first part
    is the header of the response, and the second part contains
    the data (ie: 'literal' value).

    Errors raise the exception class <instance>.error("<reason>").
    IMAP4 server errors raise <instance>.abort("<reason>"),
    which is a sub-class of 'error'. Mailbox status changes
    from READ-WRITE to READ-ONLY raise the exception class
    <instance>.readonly("<reason>"), which is a sub-class of 'abort'.

    "error" exceptions imply a program error.
    "abort" exceptions imply the connection should be reset, and
            the command re-tried.
    "readonly" exceptions imply the command should be re-tried.

    Note: to use this module, you must read the RFCs pertaining to the
    IMAP4 protocol, as the semantics of the arguments to each IMAP4
    command are left to the invoker, not to mention the results. Also,
    most IMAP servers implement a sub-set of the commands available here.
    terrorcBseZRS((t__name__t
__module__(((s#/usr/local/lib/python2.5/imaplib.pyR1stabortcBseZRS((R2R3(((s#/usr/local/lib/python2.5/imaplib.pyR4streadonlycBseZRS((R2R3(((s#/usr/local/lib/python2.5/imaplib.pyR5ss[^\w!#$%&'*+,.:;<=>?^`|~-]tcCst|_d|_d|_h|_h|_d|_t|_	d|_
|i||tt
idd|_tid|id|_d|_d|_h|_|id	jo)|id
t|id|in|i|_d|ijo
d
|_n0d|ijo
d|_n|i|i|i\}}|dgjo|idnt|dii|_|idjo|id|ifnx2t D]*}||ijoqn||_!dSqW|iddS(NR
R6iiis(?P<tag>s"\d+) (?P<type>[A-Z]+) (?P<data>.*)i
isimaplib version %ssnew IMAP4 connection, tag=%stPREAUTHRtOKRs"no CAPABILITY response from serveriisCAPABILITIES: %rsserver not IMAP4 compliant("tDebugtdebugtstatetNonetliteralttagged_commandstuntagged_responsestcontinuation_responsetFalsetis_readonlyttagnumtopenRtrandomtrandintttagpretretcompilettagret_cmd_log_lent_cmd_log_idxt_cmd_logt_mesgt__version__t
_get_responsetwelcomeR1t
capabilityttupletuppertsplittcapabilitiestAllowedVersionstPROTOCOL_VERSION(tselfthosttportttyptdattversion((s#/usr/local/lib/python2.5/imaplib.pyt__init__sJ											

	cCs8|tjot||iSntd|dS(NsUnknown IMAP4 command: '%s'(tCommandstgetattrtlowertAttributeError(RYtattr((s#/usr/local/lib/python2.5/imaplib.pyt__getattr__s
cCs\||_||_tititi|_|ii||f|iid|_dS(sSetup connection to remote server on "host:port"
            (default: localhost:standard IMAP4 port).
        This connection will be used by the routines:
            read, readline, send, shutdown.
        trbN(	RZR[tsockettAF_INETtSOCK_STREAMtsocktconnecttmakefiletfile(RYRZR[((s#/usr/local/lib/python2.5/imaplib.pyRDs
		cCs|ii|S(sRead 'size' bytes from remote.(Rmtread(RYtsize((s#/usr/local/lib/python2.5/imaplib.pyRnscCs
|iiS(sRead line from remote.(Rmtreadline(RY((s#/usr/local/lib/python2.5/imaplib.pyRpscCs|ii|dS(sSend data to remote.N(Rjtsendall(RYtdata((s#/usr/local/lib/python2.5/imaplib.pytsendscCs|ii|iidS(s Close I/O established in "open".N(RmtcloseRj(RY((s#/usr/local/lib/python2.5/imaplib.pytshutdowns
cCs|iS(sfReturn socket instance used to connect to IMAP4 server.

        socket = <instance>.socket()
        (Rj(RY((s#/usr/local/lib/python2.5/imaplib.pyRgscCsbd}|iddg|\}}|do||fSn|i\}}|i|||S(sReturn most recent 'RECENT' responses if any exist,
        else prompt server for an update using the 'NOOP' command.

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

        'data' is None if no new messages,
        else list of RECENT responses, most recent last.
        tRECENTR8iN(t_untagged_responseR<tnoop(RYtnameR\R]((s#/usr/local/lib/python2.5/imaplib.pytrecents	cCs|i|dg|iS(sReturn data for response 'code' if received, or None.

        Old value for response 'code' is cleared.

        (code, [data]) = <instance>.response(code)
        N(RwR<RT(RYtcode((s#/usr/local/lib/python2.5/imaplib.pytresponsescCsd}|p
d}n|o-|d|dfdjod|}qQnd	}|ot|}nd	}tit||_|i||||S(
sAppend message to named mailbox.

        (typ, [data]) = <instance>.append(mailbox, flags, date_time, message)

                All args except `message' can be None.
        R
tINBOXiit(t)s(%s)(R~RN(R<RtMapCRLFtsubtCRLFR=t_simple_command(RYtmailboxtflagst	date_timetmessageRy((s#/usr/local/lib/python2.5/imaplib.pytappend*s
cCsm|i}t|i|_|id|\}}|djo|i|dnd|_||fS(s,Authenticate command - requires response processing.

        'mechanism' specifies which authentication mechanism is to
        be used - it must appear in <instance>.capabilities in the
        form AUTH=<mechanism>.

        'authobject' must be a callable object:

                data = authobject(response)

        It will be called to process server continuation responses.
        It should return data that will be encoded and sent to server.
        It should return None if the client abort response '*' should
        be sent instead.
        RR8iR(RTt_AuthenticatortprocessR=RR1R;(RYt	mechanismt
authobjecttmechR\R]((s#/usr/local/lib/python2.5/imaplib.pytauthenticateAs
	cCs.d}|i|\}}|i|||S(sT(typ, [data]) = <instance>.capability()
        Fetch capabilities list from server.R(RRw(RYRyR\R]((s#/usr/local/lib/python2.5/imaplib.pyRR^scCs
|idS(sRCheckpoint mailbox on server.

        (typ, [data]) = <instance>.check()
        R(R(RY((s#/usr/local/lib/python2.5/imaplib.pytcheckgscCs0z|id\}}Wdd|_X||fS(sClose currently selected mailbox.

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

        (typ, [data]) = <instance>.close()
        RNR(RR;(RYR\R]((s#/usr/local/lib/python2.5/imaplib.pyRtos
cCs|id||S(sCopy 'message_set' messages onto end of 'new_mailbox'.

        (typ, [data]) = <instance>.copy(message_set, new_mailbox)
        R(R(RYtmessage_settnew_mailbox((s#/usr/local/lib/python2.5/imaplib.pytcopy~scCs|id|S(sPCreate new mailbox.

        (typ, [data]) = <instance>.create(mailbox)
        R(R(RYR((s#/usr/local/lib/python2.5/imaplib.pytcreatescCs|id|S(sPDelete old mailbox.

        (typ, [data]) = <instance>.delete(mailbox)
        R(R(RYR((s#/usr/local/lib/python2.5/imaplib.pytdeletescCs|id||S(sDelete the ACLs (remove any rights) set for who on mailbox.

        (typ, [data]) = <instance>.deleteacl(mailbox, who)
        R(R(RYRtwho((s#/usr/local/lib/python2.5/imaplib.pyt	deleteaclscCs.d}|i|\}}|i|||S(sPermanently 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.
        R(RRw(RYRyR\R]((s#/usr/local/lib/python2.5/imaplib.pytexpunges	cCs4d}|i|||\}}|i|||S(s#Fetch (parts of) messages.

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

        'message_parts' should be a string of selected parts
        enclosed in parentheses, eg: "(UID BODY[TEXT])".

        'data' are tuples of message part envelope and data.
        R(RRw(RYRt
message_partsRyR\R]((s#/usr/local/lib/python2.5/imaplib.pytfetchs
cCs+|id|\}}|i||dS(sXGet the ACLs for a mailbox.

        (typ, [data]) = <instance>.getacl(mailbox)
        RtACL(RRw(RYRR\R]((s#/usr/local/lib/python2.5/imaplib.pytgetaclscCs1|id|||\}}|i||dS(sa(typ, [data]) = <instance>.getannotation(mailbox, entry, attribute)
        Retrieve ANNOTATIONs.Rt
ANNOTATION(RRw(RYRtentryt	attributeR\R]((s#/usr/local/lib/python2.5/imaplib.pyt
getannotationscCs+|id|\}}|i||dS(sGet the quota root's resource usage and limits.

        Part of the IMAP4 QUOTA extension defined in rfc2087.

        (typ, [data]) = <instance>.getquota(root)
        RtQUOTA(RRw(RYtrootR\R]((s#/usr/local/lib/python2.5/imaplib.pytgetquotascCs^|id|\}}|i||d\}}|i||d\}}|||gfS(sGet the list of quota roots for the named mailbox.

        (typ, [[QUOTAROOT responses...], [QUOTA responses]]) = <instance>.getquotaroot(mailbox)
        RRt	QUOTAROOT(RRw(RYRR\R]tquotat	quotaroot((s#/usr/local/lib/python2.5/imaplib.pytgetquotarootss""t*cCs4d}|i|||\}}|i|||S(sList mailbox names in directory matching pattern.

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

        'data' is list of LIST responses.
        R(RRw(RYt	directorytpatternRyR\R]((s#/usr/local/lib/python2.5/imaplib.pytlistscCs[|id||i|\}}|djo|i|dnd|_||fS(sIdentify client using plaintext password.

        (typ, [data]) = <instance>.login(user, password)

        NB: 'password' will be quoted.
        RR8iR(Rt_quoteR1R;(RYtusertpasswordR\R]((s#/usr/local/lib/python2.5/imaplib.pytlogins
$
	cCs&|||_|_|id|iS(sr Force use of CRAM-MD5 authentication.

        (typ, [data]) = <instance>.login_cram_md5(user, password)
        sCRAM-MD5(RRRt_CRAM_MD5_AUTH(RYRR((s#/usr/local/lib/python2.5/imaplib.pytlogin_cram_md5scCs0ddk}|id|i|i|iS(s1 Authobject to use with CRAM-MD5 authentication. iNt (thmacRtHMACRt	hexdigest(RYt	challengeR((s#/usr/local/lib/python2.5/imaplib.pyRscCsd|_y|id\}}Wn%ddtid g}}nX|id|ijod|idfSn||fS(s|Shutdown connection to server.

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

        Returns server 'BYE' response.
        R
tNOs%s: %sitBYE(R;Rtsystexc_infoRuR?(RYR\R]((s#/usr/local/lib/python2.5/imaplib.pytlogout	s	"
cCs4d}|i|||\}}|i|||S(sList 'subscribed' mailbox names in directory matching pattern.

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

        'data' are tuples of message part envelope and data.
        R(RRw(RYRRRyR\R]((s#/usr/local/lib/python2.5/imaplib.pytlsubscCs+|id|\}}|i||dS(sShow my ACLs for a mailbox (i.e. the rights that I have on mailbox).

        (typ, [data]) = <instance>.myrights(mailbox)
        R(RRw(RYRR\R]((s#/usr/local/lib/python2.5/imaplib.pytmyrights$scCs.d}|i|\}}|i|||S(sb Returns IMAP namespaces ala rfc2342

        (typ, [data, ...]) = <instance>.namespace()
        R (RRw(RYRyR\R]((s#/usr/local/lib/python2.5/imaplib.pyt	namespace,scCs1|idjo|i|in|idS(sFSend NOOP command.

        (typ, [data]) = <instance>.noop()
        iR!(R:t_dump_urR?R(RY((s#/usr/local/lib/python2.5/imaplib.pyRx6scCs:d}|i|||||\}}|i||dS(sFetch truncated part of a message.

        (typ, [data, ...]) = <instance>.partial(message_num, message_part, start, length)

        'data' is tuple of message part envelope and data.
        R"R(RRw(RYtmessage_numtmessage_parttstarttlengthRyR\R]((s#/usr/local/lib/python2.5/imaplib.pytpartialAs!cCsd}|id|S(sAssume authentication as "user".

        Allows an authorised administrator to proxy into any user's
        mailbox.

        (typ, [data]) = <instance>.proxyauth(user)
        R#(R(RYRRy((s#/usr/local/lib/python2.5/imaplib.pyt	proxyauthMs	cCs|id||S(skRename old mailbox name to new.

        (typ, [data]) = <instance>.rename(oldmailbox, newmailbox)
        R$(R(RYt
oldmailboxt
newmailbox((s#/usr/local/lib/python2.5/imaplib.pytrenameZscGsZd}|o"|i|d||\}}n|i||\}}|i|||S(sSearch mailbox for matching messages.

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

        'data' is space separated list of matching message numbers.
        R%tCHARSET(RRw(RYtcharsettcriteriaRyR\R]((s#/usr/local/lib/python2.5/imaplib.pytsearchbs
"R}cCsh|_||_|o
d}nd}|i||\}}|djod|_||fSnd|_d|ijoC|o;|idjo|i|in|id|n||iid	d
gfS(stSelect a mailbox.

        Flush all untagged responses.

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

        'data' is count of messages in mailbox ('EXISTS' response).

        Mandated responses are ('FLAGS', 'EXISTS', 'RECENT', 'UIDVALIDITY'), so
        other responses should be obtained via <instance>.response('FLAGS') etc.
        RR&R8RR	s	READ-ONLYis%s is not writabletEXISTSN(	R?RBRR;R:RR5tgetR<(RYRR5RyR\R]((s#/usr/local/lib/python2.5/imaplib.pytselectqs 		

		cCs|id|||S(sZSet a mailbox acl.

        (typ, [data]) = <instance>.setacl(mailbox, who, what)
        R'(R(RYRRtwhat((s#/usr/local/lib/python2.5/imaplib.pytsetaclscGs+|id|\}}|i||dS(s_(typ, [data]) = <instance>.setannotation(mailbox[, entry, attribute]+)
        Set ANNOTATIONs.R(R(RRw(RYtargsR\R]((s#/usr/local/lib/python2.5/imaplib.pyt
setannotationscCs.|id||\}}|i||dS(siSet the quota root's resource limits.

        (typ, [data]) = <instance>.setquota(root, limits)
        R)R(RRw(RYRtlimitsR\R]((s#/usr/local/lib/python2.5/imaplib.pytsetquotascGs`d}|d|dfdjod|}n|i||||\}}|i|||S(sIMAP4rev1 extension SORT command.

        (typ, [data]) = <instance>.sort(sort_criteria, charset, search_criteria, ...)
        R*iiR~Rs(%s)(R~R(RRw(RYt
sort_criteriaRtsearch_criteriaRyR\R]((s#/usr/local/lib/python2.5/imaplib.pytsorts
cCs4d}|i|||\}}|i|||S(spRequest named status conditions for mailbox.

        (typ, [data]) = <instance>.status(mailbox, names)
        R+(RRw(RYRtnamesRyR\R]((s#/usr/local/lib/python2.5/imaplib.pytstatusscCsZ|d|dfdjod|}n|id|||\}}|i||dS(	sAlters flag dispositions for messages in mailbox.

        (typ, [data]) = <instance>.store(message_set, command, flags)
        iiR~Rs(%s)R,R(R~R(RRw(RYRtcommandRR\R]((s#/usr/local/lib/python2.5/imaplib.pytstorescCs|id|S(sYSubscribe to new mailbox.

        (typ, [data]) = <instance>.subscribe(mailbox)
        R-(R(RYR((s#/usr/local/lib/python2.5/imaplib.pyt	subscribescGs7d}|i||||\}}|i|||S(sIMAPrev1 extension THREAD command.

        (type, [data]) = <instance>.thread(threading_alogrithm, charset, search_criteria, ...)
        R.(RRw(RYtthreading_algorithmRRRyR\R]((s#/usr/local/lib/python2.5/imaplib.pytthreadscGs|i}|tjo|id|n|it|jo |id||ifnd}|i|||\}}|djo
|}nd}|i|||S(sExecute "command arg ..." with messages identified by UID,
                rather than message number.

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

        Returns response appropriate to 'command'.
        sUnknown IMAP4 UID command: %sscommand %s illegal in state %sR/R%R*R(sSEARCHsSORT(RTR`R1R;RRw(RYRRRyR\R]((s#/usr/local/lib/python2.5/imaplib.pytuids
	

cCs|id|S(s_Unsubscribe from old mailbox.

        (typ, [data]) = <instance>.unsubscribe(mailbox)
        R0(R(RYR((s#/usr/local/lib/python2.5/imaplib.pytunsubscribescGs=|i}|tjo|ift|<n|i||S(sAllow simple extension commands
                notified by server in CAPABILITY response.

        Assumes command is legal in current state.

        (typ, [data]) = <instance>.xatom(name, arg, ...)

        Returns response appropriate to extension command `name'.
        (RTR`R;R(RYRyR((s#/usr/local/lib/python2.5/imaplib.pytxatoms

cCs|djo
d}n|i}|idjo0|id|t|i|d|fn||jo||i|n|g||<dS(NR6is#untagged_responses[%s] %s += ["%s"](R<R?R:RNtlenRR(RYR\R]tur((s#/usr/local/lib/python2.5/imaplib.pyt_append_untaggeds

		'
cCs4|iid}|o|i|dndS(NRi(R?RR4(RYtbye((s#/usr/local/lib/python2.5/imaplib.pyt
_check_bye$sc

Gs|it|jo)d|_|id||ifnx,dD]$}||ijo|i|=qDqDWd|ijo|io|idn|i}d||f}x;|D]3}|djoqnd||i	|f}qW|i}|dj	oOd|_t
|t
|ijo
|}qYd}d|t|f}n|i
d	jo|id
|n|id
|y|id|tfWn1titfj
o}	|id|	nX|djo|Snxx(|io|i|o|SqqW|o||i}n|i
d	jo|id
t|ny|i||itWn1titfj
o}	|id|	nX|pPqq|S(Nscommand %s illegal in state %sR8RtBADs	READ-ONLYs#mailbox status changed to READ-ONLYs%s %ss%s {%s}is> %ss%s%sssocket error: %sswrite literal size %s(sOKsNOR(R;R`R<R=R1R?RBR5t_new_tagt_checkquotettypet_commandRR:RNt_logRsRRgtOSErrorR4RPR>R@(
RYRyRR\ttagRrtargR=t	literatortval((s#/usr/local/lib/python2.5/imaplib.pyR*sf	
	
	




cCs|iy|i|\}}Wna|ij
o"}|id||fn2|ij
o"}|id||fnX|i|djo |id|||fn||fS(Nscommand: %s => %sRs%s command error: %s %s(Rt_get_tagged_responseR4R1(RYRyRR\RrR((s#/usr/local/lib/python2.5/imaplib.pyt_command_completers


 cCs|i}|i|i|ow|iid}||ijo|id|n|iid}|iid}||gf|i|<nd}|it|p-|it	|o|iid}qn|idjoG|it
|o|iid|_dSn|id|n|iid}|iid}|djo
d}n|o|d|}nx|it|ort
|iid	}|id
jo|id|n|i|}|i|||f|i}qW|i|||djo?|it|o,|i|iid|iidn|idjo(|djo|id||fn|S(NRsunexpected tagged response: %sRRrtdata2sunexpected response: '%s'R6RRoisread literal size %sR8RRiRs%s response: %s(sOKsNOsBAD(sNOsBADsBYE(t	_get_linet_matchRJtmotgroupR>R4R<tUntagged_responsetUntagged_statustContinuationR@tLiteraltintR:RNRnRt
Response_code(RYtrespRR\R]tdat2RoRr((s#/usr/local/lib/python2.5/imaplib.pyRPsJ

 ,cCsxy|i|}|dj	o|i|=|Sny|iWq|ij
o*}|idjo|inqXqdS(Ni(R>R<RPR4R:t	print_log(RYRtresultR((s#/usr/local/lib/python2.5/imaplib.pyRs


cCsj|i}|p|idn|d }|idjo|id|n|id||S(Nssocket error: EOFiis< %s(RpR4R:RNR(RYtline((s#/usr/local/lib/python2.5/imaplib.pyRs
cCsf|i||_|idj	o7|idjo'|id|i|iifn|idj	S(Nis	matched r'%s' => %r(tmatchRR<R:RNRtgroups(RYtcrets((s#/usr/local/lib/python2.5/imaplib.pyRs 'cCs7d|i|if}|id|_d|i|<|S(Ns%s%si(RGRCR<R>(RYR((s#/usr/local/lib/python2.5/imaplib.pyRs
cCst|tdj	o|Snt|djo)|d|dfdd	fjo|Sn|o!|ii|djo|Sn|i|S(
NR6iiiR~Rt"(R~R(RR(RRt	mustquoteRR<R(RYR((s#/usr/local/lib/python2.5/imaplib.pyRs4 cCs,|idd}|idd}d|S(Ns\s\\Rs\"s"%s"(treplace(RYR((s#/usr/local/lib/python2.5/imaplib.pyRscGs|i||i||S(N(RR(RYRyR((s#/usr/local/lib/python2.5/imaplib.pyRscCs|djo||fSn||ijo|dgfSn|ii|}|idjo|id||fn||fS(NRisuntagged_responses[%s] => %s(R?R<tpopR:RN(RYR\R]RyRr((s#/usr/local/lib/python2.5/imaplib.pyRw"s
cCsn|djoti}ntidti|}tiid||dd|ftiidS(Ns%M:%Ss
  %s.%02d %s
id(R<ttimetstrftimet	localtimeRtstderrtwritetflush(RYRtsecsttm((s#/usr/local/lib/python2.5/imaplib.pyRN1s

%cCsW|i}|pdSnd}td|}|id||i|fdS(Ns
		cSs5d|d|ddodi|dpdfS(s%s: "%s"iis" "R6(tjoin(tx((s#/usr/local/lib/python2.5/imaplib.pyt<lambda>=ssuntagged responses dump:%s%s(titemstmapRNR(RYtdicttltt((s#/usr/local/lib/python2.5/imaplib.pyR8scCsO|tif|i|i<|id7_|i|ijo
d|_ndS(Nii(RRMRLRK(RYR((s#/usr/local/lib/python2.5/imaplib.pyR@scCs|idt|i|i|i}}x\|oTy|i|i|WnnX|d7}||ijo
d}n|d8}q0WdS(Nslast %d IMAP4 interactions:ii(RNRRMRLRK(RYtitn((s#/usr/local/lib/python2.5/imaplib.pyRGs

N(PR2R3t__doc__t	ExceptionR1R4R5RHRIR	t
IMAP4_PORTR_ReRDRnRpRsRuRgRzR|RRRRRRtRRRRRRRRRRRRRRRRRRRxRRRRRARRRRRRRRRRRRRRRRRPRRRRRRRRwR<RNRRR(((s#/usr/local/lib/python2.5/imaplib.pyRcs,;	
																															
			
		 									
						H		L										cBsheZdZded
d
dZdedZdZdZdZ	dZ
dZd	ZRS(sIMAP4 client class over SSL connection

    Instantiate with: IMAP4_SSL([host[, port[, keyfile[, certfile]]]])

            host - host's name (default: localhost);
            port - port number (default: standard IMAP4 SSL port).
            keyfile - PEM formatted file that contains your private key (default: None);
            certfile - PEM formatted certificate chain file (default: None);

    for more documentation see the docstring of the parent class IMAP4.
    R6cCs)||_||_ti|||dS(N(tkeyfiletcertfileRR_(RYRZR[R!R"((s#/usr/local/lib/python2.5/imaplib.pyR_es		cCsh||_||_tititi|_|ii||fti|i|i|i	|_
dS(sSetup connection to remote server on "host:port".
            (default: localhost:standard IMAP4 SSL port).
        This connection will be used by the routines:
            read, readline, send, shutdown.
        N(RZR[RgRhRiRjRktsslR!R"tsslobj(RYRZR[((s#/usr/local/lib/python2.5/imaplib.pyRDks
		cCsjg}d}xN||jo@|iit||d}|t|7}|i|qWdi|S(sRead 'size' bytes from remote.ii@R6(R$RntminRRR(RYRotchunksRnRr((s#/usr/local/lib/python2.5/imaplib.pyRnxs
cCsMg}x@|iid}|i||djodi|Sq	q	dS(sRead line from remote.is
R6N(R$RnRR(RYRtchar((s#/usr/local/lib/python2.5/imaplib.pyRps

cCs]t|}xJ|djo<|ii|}||joPn||}||}qWdS(sSend data to remote.iN(RR$R(RYRrtbytestsent((s#/usr/local/lib/python2.5/imaplib.pyRss


cCs|iidS(s Close I/O established in "open".N(RjRt(RY((s#/usr/local/lib/python2.5/imaplib.pyRuscCs|iS(sfReturn socket instance used to connect to IMAP4 server.

        socket = <instance>.socket()
        (Rj(RY((s#/usr/local/lib/python2.5/imaplib.pyRgscCs|iS(stReturn SSLObject instance used to communicate with the IMAP4 server.

        ssl = <instance>.socket.ssl()
        (R$(RY((s#/usr/local/lib/python2.5/imaplib.pyR#sN(
R2R3RtIMAP4_SSL_PORTR<R_RDRnRpRsRuRgR#(((s#/usr/local/lib/python2.5/imaplib.pyRVs
	
	
			cBsJeZdZdZdddZdZdZdZdZ	RS(sIMAP4 client class over a stream

    Instantiate with: IMAP4_stream(command)

            where "command" is a string that can be passed to os.popen2()

    for more documentation see the docstring of the parent class IMAP4.
    cCs||_ti|dS(N(RRR_(RYR((s#/usr/local/lib/python2.5/imaplib.pyR_s	cCsFd|_d|_d|_d|_ti|i\|_|_	dS(sSetup a stream connection.
        This connection will be used by the routines:
            read, readline, send, shutdown.
        N(
R<RZR[RjRmtostpopen2Rt	writefiletreadfile(RYRZR[((s#/usr/local/lib/python2.5/imaplib.pyRDs
				cCs|ii|S(sRead 'size' bytes from remote.(R.Rn(RYRo((s#/usr/local/lib/python2.5/imaplib.pyRnscCs
|iiS(sRead line from remote.(R.Rp(RY((s#/usr/local/lib/python2.5/imaplib.pyRpscCs!|ii||iidS(sSend data to remote.N(R-RR(RYRr((s#/usr/local/lib/python2.5/imaplib.pyRsscCs|ii|iidS(s Close I/O established in "open".N(R.RtR-(RY((s#/usr/local/lib/python2.5/imaplib.pyRus
N(
R2R3RR_R<RDRnRpRsRu(((s#/usr/local/lib/python2.5/imaplib.pyRs					RcBs2eZdZdZdZdZdZRS(scPrivate class to provide en/decoding
            for base64-based authentication conversation.
    cCs
||_dS(N(R(RYtmechinst((s#/usr/local/lib/python2.5/imaplib.pyR_scCs:|i|i|}|djodSn|i|S(NR(RtdecodeR<tencode(RYRrtret((s#/usr/local/lib/python2.5/imaplib.pyRs
cCsxd}xk|oct|djo|d }|d}n
|}d}ti|}|o||d }q	q	W|S(NR6i0i(Rtbinasciit
b2a_base64(RYtinptoupRte((s#/usr/local/lib/python2.5/imaplib.pyR1s	
cCs|pdSnti|S(NR6(R3t
a2b_base64(RYR5((s#/usr/local/lib/python2.5/imaplib.pyR0
s(R2R3RR_RR1R0(((s#/usr/local/lib/python2.5/imaplib.pyRs
			itJanitFebitMaritApritMayitJunitJulitAugi	tSepi
tOctitNovitDecc	Csti|}|pd
Snt|id}|id}t|id}t|id}t|id}t|id}t|id}t|id}	t|id	}
|	d
|
d
}|djo|}n||||||dddf	}ti|}
ti|
}ti	o|do|ti
}n|ti}ti|
|S(sMConvert IMAP4 INTERNALDATE to UT.

    Returns Python time module tuple.
    tmontzonentdaytyearthourR%tsectzonehtzonemi<t-iN(tInternalDateRR<tMon2numRRRtmktimeRtdaylighttaltzonettimezone(RRRERFRGRHRIR%RJRKRLtzonettttutctlt((s#/usr/local/lib/python2.5/imaplib.pyRs,
!
cCsTd}d}tt|}x/|o't|d\}}|||}q!W|S(s-Convert integer to A-P string representation.R6tABCDEFGHIJKLMNOPi(Rtabstdivmod(tnumRtAPtmod((s#/usr/local/lib/python2.5/imaplib.pyR@scCs7ti|}|pdSnt|idiS(s-Convert IMAP4 flags response to python tuple.R((tFlagsRRSRRU(RR((s#/usr/local/lib/python2.5/imaplib.pyRMscCst|ttfoti|}nct|ttifo
|}n@t|to#|d|dfdjo|Sn
tdti	d|}|ddjod|d}nti
o|doti}nti}d|d	t
|d
d
dS(syConvert 'date_time' to IMAP4 INTERNALDATE representation.

    Return string in form: '"DD-Mmm-YYYY HH:MM:SS +HHMM"'
    iiRsdate_time not of a known types%d-%b-%Y %H:%M:%St0Ris
 %+03d%02di<(RR(t
isinstanceRtfloatRRRStstruct_timetstrt
ValueErrorR
RQRRRSRZ(RRUtdtRT((s#/usr/local/lib/python2.5/imaplib.pyRXs
+
t__main__sd:s:s-ds-sR6sIMAP password for %s on %s: t	localhostsJFrom: %(user)s@localhost%(lf)sSubject: IMAP4 test%(lf)s%(lf)sdata...%(lf)sRs
tlfRRs
/tmp/xxx 1Rs/tmp/yyys
/tmp/yyz 2RRs/tmpsyy*RRtSUBJECTttestRt1s(FLAGS INTERNALDATE RFC822)RtFLAGSs
(\Deleted)RRRzRtR|tUIDVALIDITYRtALLRRcCsktid||ftt||\}}tid|||f|djo|dn|S(Ns%s %ss%s => %s %sRi(tMRNRa(tcmdRR\R]((s#/usr/local/lib/python2.5/imaplib.pytruns
sPROTOCOL_VERSION = %ssCAPABILITIES = %rs/tmp/syy%s.*"([^"]+)"$Rs%ss:(FLAGS INTERNALDATE RFC822.SIZE RFC822.HEADER RFC822.TEXT)s
All tests OK.s
Tests failed.s8
If you would like to see debugging output,
try: %s -d5
(DRROR3R+RERHRgRRt__all__RR9R R*RWR`RIRR^RNRRRRRRRRRRORRRRR2tgetopttgetpasstargvtoptlistRR1RR<tstream_commandtoptRRZtgetusertUSERtPASSWDt	test_mesgt	test_seq1t	test_seq2RqRoR;RNRXRVRptmlRRRtpathRUR]R(((s#/usr/local/lib/python2.5/imaplib.pys<module>s$T[4,:8	,	
		
#



 							

Man Man