ACC SHELL

Path : /usr/lib/python/email/
File Upload :
Current File : //usr/lib/python/email/_parseaddr.pyo

Ńň
rÄMc@sXdZddddgZddkZdZdZd	Zd
ddd
dddddddddddddddddddd gZd!d"d#d$d%d&d'gZhd(d)6d(d*6d(d+6d(d,6d-d.6d/d06d1d26d-d36d4d56d1d66d7d86d4d96d:d;6d7d<6Zd=„Z	d>„Z
d?„Zd@„ZdAfdB„ƒYZ
dCe
fdD„ƒYZdS(EscEmail address parsing code.

Lifted directly from rfc822.py.  This should eventually be rewritten.
t	mktime_tzt	parsedatetparsedate_tztquotei˙˙˙˙Nt ts, tjantfebtmartaprtmaytjuntjultaugtseptocttnovtdectjanuarytfebruarytmarchtapriltjunetjulytaugustt	septembertoctobertnovembertdecembertmonttuetwedtthutfritsattsunitUTtUTCtGMTtZipţ˙˙tASTiÔţ˙˙tADTiţ˙˙tESTtEDTi¨ý˙˙tCSTtCDTiDý˙˙tMSTtMDTiŕü˙˙tPSTtPDTcCs|iƒ}|didƒp|diƒtjo|d=n;|didƒ}|djo|d|d|d<nt|ƒdjo<|didƒ}t|ƒdjo||d}qËnt|ƒdjoW|d}|idƒ}|djo || ||dg|d)q5|idƒnt|ƒd	jodS|d	 }|\}}}}}|iƒ}|t	jo)||iƒ}}|t	jodSnt	i
|ƒd}|d
jo|d
8}n|ddjo|d }n|idƒ}|djo||}}n|ddjo|d }n|diƒp||}}n|ddjo|d }n|idƒ}t|ƒd
jo|\}	}
d}n+t|ƒdjo|\}	}
}ndSy@t|ƒ}t|ƒ}t|	ƒ}	t|
ƒ}
t|ƒ}Wnt
j
odSXd}|iƒ}|tjot|}n'yt|ƒ}Wnt
j
onX|oF|djod}
|}nd}
|
|dd|dd}n||||	|
|ddd|f
S(sQConvert a date string to a time tuple.

    Accounts for military timezones.
    it,iit-it+Riii˙˙˙˙t:it0idii<N(tsplittendswithtlowert	_daynamestrfindtlentfindtappendtNonet_monthnamestindextisdigittintt
ValueErrortuppert
_timezones(tdatatitstufftstddtmmtyyttmttztthhttmmttssttzoffsetttzsign((s&/usr/lib/python2.6/email/_parseaddr.pyR-sŠ+


 


	




"cCs-t|ƒ}t|tƒo	|d S|SdS(s&Convert a time string to a time tuple.i	N(Rt
isinstancettuple(RGtt((s&/usr/lib/python2.6/email/_parseaddr.pyRƒs	cCsU|ddjoti|d dƒSti|d dƒ}||dtiSdS(sCTurn a 10-tuple as returned by parsedate_tz() into a UTC timestamp.i	ii˙˙˙˙iN(i˙˙˙˙(i(R?ttimetmktimettimezone(RGRW((s&/usr/lib/python2.6/email/_parseaddr.pyRŒscCs|iddƒiddƒS(sAdd quotes around a string.s\s\\t"s\"(treplace(tstr((s&/usr/lib/python2.6/email/_parseaddr.pyR–st
AddrlistClasscBs‰eZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	e
d„Zd	„Zd
„Z
d„Zdd„Zd
„ZRS(sţAddress parser class by Ben Escoto.

    To understand what this class does, it helps to have a copy of RFC 2822 in
    front of you.

    Note: this class interface is deprecated and may be removed in the future.
    Use rfc822.AddressList instead.
    cCsd|_d|_d|_d|_|i|i|_|i|i|i|_|iiddƒ|_||_g|_	dS(sƒInitialize a new instance.

        `field' is an unparsed address header field, containing
        one or more addresses.
        s()<>@,:;."[]is 	s
t.RN(
tspecialstpostLWStCRtFWStatomendsR\t
phraseendstfieldtcommentlist(tselfRg((s&/usr/lib/python2.6/email/_parseaddr.pyt__init__Ľs					cCsˆx|it|iƒjog|i|i|idjo|id7_q|i|idjo|ii|iƒƒqPqWdS(s*Parse up to the start of the next address.s

it(N(RaR<RgRbRhR>t
getcomment(Ri((s&/usr/lib/python2.6/email/_parseaddr.pytgotonext¸scCsYg}xL|it|iƒjo2|iƒ}|o||7}q	|idƒq	W|S(sVParse all addresses.

        Returns a list containing all of the addresses.
        R(RR(RaR<Rgt
getaddressR>(Ritresulttad((s&/usr/lib/python2.6/email/_parseaddr.pytgetaddrlistÂscCsśg|_|iƒ|i}|i}|iƒ}|iƒg}|it|iƒjo.|o#ti|iƒ|dfg}qenŢ|i|idjo=||_||_|iƒ}ti|iƒ|fg}nŠ|i|idjožg}t|iƒ}|id7_xK|it|iƒjoY|iƒ|i|jo+|i|idjo|id7_Pn||i	ƒ}qWnŐ|i|idjof|i
ƒ}|io4ti|ƒddi|iƒd	|fg}qeti|ƒ|fg}nX|o#ti|iƒ|dfg}n.|i|i|ijo|id7_n|iƒ|it|iƒjo*|i|id
jo|id7_n|S(sParse the next address.is.@R5it;t<s (Rt)R2(RhRmRat
getphraselistR<RgtSPACEtjointgetaddrspecRntgetrouteaddrR`(Ritoldpostoldcltplistt
returnlisttaddrspectfieldlent	routeaddr((s&/usr/lib/python2.6/email/_parseaddr.pyRnĐsN	
		
'		
'
4#
0cCs,|i|idjodSt}|id7_|iƒd}xä|it|iƒjoĘ|o|iƒt}n˘|i|idjo|id7_Pnw|i|idjo|id7_t}nG|i|idjo|id7_n|iƒ}|id7_P|iƒqDW|S(sParse a route address (Return-path value).

        This method just skips all the route stuff and returns the addrspec.
        RsNiRt>t@R5(RgRatFalseRmR<t	getdomaintTrueRx(Ritexpectroutetadlist((s&/usr/lib/python2.6/email/_parseaddr.pyRys0



cCsQg}|iƒxĂ|it|iƒjoŠ|i|idjo |idƒ|id7_ne|i|idjo|id|iƒƒn3|i|i|ijoPn|i|iƒƒ|iƒqW|it|iƒjp|i|idjoti	|ƒS|idƒ|id7_|iƒti	|ƒ|i
ƒS(sParse an RFC 2822 addr-spec.R_iR[s"%s"R‚(RmRaR<RgR>tgetquoteRetgetatomtEMPTYSTRINGRwR„(Ritaslist((s&/usr/lib/python2.6/email/_parseaddr.pyRx+s&

0

cCs)g}x|it|iƒjoů|i|i|ijo|id7_q	|i|idjo|ii|iƒƒq	|i|idjo|i|iƒƒq	|i|idjo |id7_|idƒq	|i|i|ijoPq	|i|i	ƒƒq	Wt
i|ƒS(s-Get the complete domain name from an address.iRkt[R_(RaR<RgRbRhR>RltgetdomainliteralReR‰RŠRw(Ritsdlist((s&/usr/lib/python2.6/email/_parseaddr.pyR„Ds cCs:|i|i|jodSdg}t}|id7_xđ|it|iƒjoÖ|o!|i|i|iƒt}nœ|i|i|jo|id7_Pnq|o1|i|idjo|i|iƒƒq=n9|i|idjo
t}n|i|i|iƒ|id7_q=Wti|ƒS(sćParse a header fragment delimited by special characters.

        `beginchar' is the start character for the fragment.
        If self is not looking at an instance of `beginchar' then
        getdelimited returns the empty string.

        `endchars' is a sequence of allowable end-delimiting characters.
        Parsing stops when one of these is encountered.

        If `allowcomments' is non-zero, embedded RFC 2822 comments are allowed
        within the parsed fragment.
        RiRks\(	RgRaRƒR<R>RlR…RŠRw(Rit	beginchartendcharst
allowcommentstslistR((s&/usr/lib/python2.6/email/_parseaddr.pytgetdelimitedWs*
	

cCs|iddtƒS(s1Get a quote-delimited fragment from self's field.R[s"
(R“Rƒ(Ri((s&/usr/lib/python2.6/email/_parseaddr.pyRˆ|scCs|iddtƒS(s7Get a parenthesis-delimited fragment from self's field.Rks)
(R“R…(Ri((s&/usr/lib/python2.6/email/_parseaddr.pyRl€scCsd|iddtƒS(s!Parse an RFC 2822 domain-literal.s[%s]RŒs]
(R“Rƒ(Ri((s&/usr/lib/python2.6/email/_parseaddr.pyR„scCs“dg}|djo
|i}nx`|it|iƒjoF|i|i|joPn|i|i|iƒ|id7_q&Wti|ƒS(sParse an RFC 2822 atom.

        Optional atomends specifies a different set of end token delimiters
        (the default is to use self.atomends).  This is used e.g. in
        getphraselist() since phrase endings must not include the `.' (which
        is legal in phrases).RiN(R?ReRaR<RgR>RŠRw(RiRetatomlist((s&/usr/lib/python2.6/email/_parseaddr.pyR‰ˆs	

cCsďg}xâ|it|iƒjoČ|i|i|ijo|id7_q	|i|idjo|i|iƒƒq	|i|idjo|ii|iƒƒq	|i|i|ijoPq	|i|i	|iƒƒq	W|S(sýParse a sequence of RFC 2822 phrases.

        A phrase is a sequence of words, which are in turn either RFC 2822
        atoms or quoted-strings.  Phrases are canonicalized by squeezing all
        runs of continuous whitespace into one space.
        iR[Rk(
RaR<RgRdR>RˆRhRlRfR‰(RiR|((s&/usr/lib/python2.6/email/_parseaddr.pyRuœsN(t__name__t
__module__t__doc__RjRmRqRnRyRxR„R…R“RˆRlRR?R‰Ru(((s&/usr/lib/python2.6/email/_parseaddr.pyR^›s		
		;	 		%			tAddressListcBsMeZdZd„Zd„Zd„Zd„Zd„Zd„Zd„Z	RS(s@An AddressList encapsulates a list of parsed RFC 2822 addresses.cCs7ti||ƒ|o|iƒ|_n
g|_dS(N(R^RjRqtaddresslist(RiRg((s&/usr/lib/python2.6/email/_parseaddr.pyRjľscCs
t|iƒS(N(R<R™(Ri((s&/usr/lib/python2.6/email/_parseaddr.pyt__len__źscCsUtdƒ}|i|_x5|iD]*}||ijo|ii|ƒq#q#W|S(N(R˜R?R™R>(Ritothertnewaddrtx((s&/usr/lib/python2.6/email/_parseaddr.pyt__add__żs

cCs<x5|iD]*}||ijo|ii|ƒq
q
W|S(N(R™R>(RiR›R((s&/usr/lib/python2.6/email/_parseaddr.pyt__iadd__Čs

cCsHtdƒ}x5|iD]*}||ijo|ii|ƒqqW|S(N(R˜R?R™R>(RiR›RœR((s&/usr/lib/python2.6/email/_parseaddr.pyt__sub__Ďs
cCs<x5|iD]*}||ijo|ii|ƒq
q
W|S(N(R™tremove(RiR›R((s&/usr/lib/python2.6/email/_parseaddr.pyt__isub__×s

cCs|i|S(N(R™(RiRA((s&/usr/lib/python2.6/email/_parseaddr.pyt__getitem__Ţs(
R•R–R—RjRšRžRŸR R˘RŁ(((s&/usr/lib/python2.6/email/_parseaddr.pyR˜łs							(R—t__all__RXRvRŠt
COMMASPACER@R:RFRRRRR^R˜(((s&/usr/lib/python2.6/email/_parseaddr.pyt<module>s4		V			
	˙

ACC SHELL 2018