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KO}ӽmSşذqsOy?\[,d@'73'j%kOe`1.g2"e =YIzS2|zŐƄa\U,dP;jhhhaxǶ?КZ՚.q SE+XrbOu%\GتX(H,N^~]JyEZQKceTQ]VGYqnah;y$cQahT&QPZ*iZ8UQQM.qo/T\7X"u?Mttl2Xq(IoW{R^ ux*SYJ! 4S.Jy~ BROS[V|žKNɛP(L6V^|cR7i7nZW1Fd@ Ara{詑|(T*dN]Ko?s=@ |_EvF]׍kR)eBJc" MUUbY6`~V޴dJKß&~'d3i WWWWWW
Current Directory: /usr/lib64/python2.7
Viewing File: /usr/lib64/python2.7/rfc822.pyo
� zfc@s�dZddlZddlmZeddd�ddd d d gZd d fZdfd��YZd�Zd�Zd�Z dfd��YZ de fd��YZ d�Z ddddddddddd d!d"d#d$d%dd&d'd(d)d*d+d,gZ d-d.d/d0d1d2d3gZid4d56d4d66d4d76d4d86d9d:6d;d<6d=d>6d9d?6d@dA6d=dB6dCdD6d@dE6dFdG6dCdH6ZdI�ZdJ�ZdK�ZedL�ZedMkr�ddlZddlZejjejdNdO�ZejdPrejdPZneedQ�Zee�ZdRGej dS�GHdTGej!dU�GHdVGej"dW�GHdXGej"dY�GHej#dY�Z$e$dZ%ej&ee$��Z$e$rdZGej'e$�Ge%Z(e)e(d[�\Z*Z+e)e*d[�\Z,Z-d\e,e-fGe+r�d]e+GnHn dZGeGHej.�d4Z/xej0�r8e/dP7Z/qWd^Ge/GHd_d`GHdaGe1e�GHdbekrvdcGedbGHnddekr�ndeGej2�GHdfGej3�GHdgGej4�GHndS(hs* RFC 2822 message manipulation. Note: This is only a very rough sketch of a full RFC-822 parser; in particular the tokenizing of addresses does not adhere to all the quoting rules. Note: RFC 2822 is a long awaited update to RFC 822. This module should conform to RFC 2822, and is thus mis-named (it's not worth renaming it). Some effort at RFC 2822 updates have been made, but a thorough audit has not been performed. Consider any RFC 2822 non-conformance to be a bug. RFC 2822: http://www.faqs.org/rfcs/rfc2822.html RFC 822 : http://www.faqs.org/rfcs/rfc822.html (obsolete) Directions for use: To create a Message object: first open a file, e.g.: fp = open(file, 'r') You can use any other legal way of getting an open file object, e.g. use sys.stdin or call os.popen(). Then pass the open file object to the Message() constructor: m = Message(fp) This class can work with any input object that supports a readline method. If the input object has seek and tell capability, the rewindbody method will work; also illegal lines will be pushed back onto the input stream. If the input object lacks seek but has an `unread' method that can push back a line of input, Message will use that to push back illegal lines. Thus this class can be used to parse messages coming from a buffered stream. The optional `seekable' argument is provided as a workaround for certain stdio libraries in which tell() discards buffered data before discovering that the lseek() system call doesn't work. For maximum portability, you should set the seekable argument to zero to prevent that initial \code{tell} when passing in an unseekable object such as a file object created from a socket object. If it is 1 on entry -- which it is by default -- the tell() method of the open file object is called once; if this raises an exception, seekable is reset to 0. For other nonzero values of seekable, this test is not made. To get the text of a particular header there are several methods: str = m.getheader(name) str = m.getrawheader(name) where name is the name of the header, e.g. 'Subject'. The difference is that getheader() strips the leading and trailing whitespace, while getrawheader() doesn't. Both functions retain embedded whitespace (including newlines) exactly as they are specified in the header, and leave the case of the text unchanged. For addresses and address lists there are functions realname, mailaddress = m.getaddr(name) list = m.getaddrlist(name) where the latter returns a list of (realname, mailaddr) tuples. There is also a method time = m.getdate(name) which parses a Date-like field and returns a time-compatible tuple, i.e. a tuple such as returned by time.localtime() or accepted by time.mktime(). See the class definition for lower level access methods. There are also some utility functions here. i����N(twarnpy3ks=in 3.x, rfc822 has been removed in favor of the email packaget stacklevelitMessaget AddressListt parsedatet parsedate_tzt mktime_tzs s cBseZdZdd�Zd�Zd�Zd�Zd�Zd�Zd�Z d �Z d �Z dd �Z e Zd �Zd �Zd�Zd�Zd�Zd�Zd�Zd�Zd�Zdd�Zd�Zd�Zd�Zd�Zd�Zd�Zd�ZRS(s/Represents a single RFC 2822-compliant message.icCs�|dkr=y|j�Wq=ttfk r9d}q=Xn||_||_d|_d|_|jr�y|jj�|_Wq�tk r�d|_q�Xn|j�|jr�y|jj�|_Wq�tk r�d|_q�XndS(s3Initialize the class instance and read the headers.iiN( ttelltAttributeErrortIOErrortfptseekabletNonetstartofheaderst startofbodyt readheaders(tselfR R ((s/usr/lib64/python2.7/rfc822.pyt__init__Xs(           cCs,|jstd�n|jj|j�dS(s7Rewind the file to the start of the body (if seekable).sunseekable fileN(R R R tseekR(R((s/usr/lib64/python2.7/rfc822.pyt rewindbodyts  c CsKi|_d|_g|_}d|_d}d}d }}}t|jd�rc|jj}n|jr{|jj }nx�|r�y |�}Wq�t k r�d }}d|_q�Xn|jj �}|s�d|_Pn|r|j d�r|j||_q~nd}|re|ddkre|j |�|j|d|j�}|j�|j|<q~n(|j|�rzq~n|j|�r�Pn|j|�}|r�|j |�|t|�dj�|j|<q~q~|d k r�q~q~|js�d |_n d |_|r||�n)|r2|jj|�n|jd |_Pq~Wd S( s�Read header lines. Read header lines up to the entirely blank line that terminates them. The (normally blank) line that ends the headers is skipped, but not included in the returned list. If a non-header line ends the headers, (which is an error), an attempt is made to backspace over it; it is never included in the returned list. The variable self.status is set to the empty string if all went well, otherwise it is an error message. The variable self.headers is a completely uninterpreted list of lines contained in the header (so printing them will reproduce the header exactly as it appears in the file). titunreadisEOF in headerssFrom s s s No headerss%Non-header line where header expecteds ; bad seekN(tdicttunixfromtheaderststatusR thasattrR RR RR treadlinet startswithtappendtstript iscommenttislasttisheadertlenR( Rtlstt headerseent firstlinet startoflineRRtlinetx((s/usr/lib64/python2.7/rfc822.pyRzsf           !     cCs-|jd�}|dkr)|| j�SdS(sDetermine whether a given line is a legal header. This method should return the header name, suitably canonicalized. You may override this method in order to use Message parsing on tagged data in RFC 2822-like formats with special header formats. t:i����N(tfindtlowerR (RR'ti((s/usr/lib64/python2.7/rfc822.pyR!�s cCs |tkS(sfDetermine whether a line is a legal end of RFC 2822 headers. You may override this method if your application wants to bend the rules, e.g. to strip trailing whitespace, or to recognize MH template separators ('--------'). For convenience (e.g. for code reading from sockets) a line consisting of \r\n also matches. (t _blanklines(RR'((s/usr/lib64/python2.7/rfc822.pyR �scCstS(s�Determine whether a line should be skipped entirely. You may override this method in order to use Message parsing on tagged data in RFC 2822-like formats that support embedded comments or free-text data. (tFalse(RR'((s/usr/lib64/python2.7/rfc822.pyR�scCs�|j�d}t|�}g}d}x_|jD]T}|| j�|krWd}n|d j�spd}n|r2|j|�q2q2W|S(s�Find all header lines matching a given header name. Look through the list of headers and find all lines matching a given header name (and their continuation lines). A list of the lines is returned, without interpretation. If the header does not occur, an empty list is returned. If the header occurs multiple times, all occurrences are returned. Case is not important in the header name. R)ii(R+R"RtisspaceR(RtnametnR#thitR'((s/usr/lib64/python2.7/rfc822.pytgetallmatchingheaders�s    cCs�|j�d}t|�}g}d}xc|jD]X}|rU|d j�stPqtn|| j�|krtd}n|r2|j|�q2q2W|S(s�Get the first header line matching name. This is similar to getallmatchingheaders, but it returns only the first matching header (and its continuation lines). R)ii(R+R"RR/R(RR0R1R#R2R'((s/usr/lib64/python2.7/rfc822.pytgetfirstmatchingheader�s  cCsB|j|�}|sdS|dt|�d|d<dj|�S(s2A higher-level interface to getfirstmatchingheader(). Return a string containing the literal text of the header but with the keyword stripped. All leading, trailing and embedded whitespace is kept in the string, however. Return None if the header does not occur. iiRN(R4R R"tjoin(RR0R#((s/usr/lib64/python2.7/rfc822.pyt getrawheaders cCs|jj|j�|�S(s Get the header value for a name. This is the normal interface: it returns a stripped version of the header value for a given header name, or None if it doesn't exist. This uses the dictionary version which finds the *last* such header. (RtgetR+(RR0tdefault((s/usr/lib64/python2.7/rfc822.pyt getheader"scCs�g}d}d}x�|j|�D]}}|dj�rf|rWd||j�f}q�|j�}q"|r||j|�n||jd�dj�}d}q"W|r�|j|�n|S(s Get all values for a header. This returns a list of values for headers given more than once; each value in the result list is stripped in the same way as the result of getheader(). If the header is not given, return an empty list. Ris%s %sR)i(R3R/RRR*(RR0tresulttcurrentt have_headerts((s/usr/lib64/python2.7/rfc822.pyt getheaders,s cCs%|j|�}|r|dSdSdS(s�Get a single address from a header, as a tuple. An example return value: ('Guido van Rossum', 'guido@cwi.nl') iN(NN(t getaddrlistR (RR0talist((s/usr/lib64/python2.7/rfc822.pytgetaddrEscCs�g}x�|j|�D]u}|ddkr<|j|�q|rR|jd�n|jd�}|dkr~||d}n|j|�qWdj|�}t|�}|jS(s Get a list of addresses from a header. Retrieves a list of addresses from a header, where each address is a tuple as returned by getaddr(). Scans all named headers, so it works properly with multiple To: or Cc: headers for example. is s, R)iR(R3RR*R5Rt addresslist(RR0trawthR,taddrtalladdrsta((s/usr/lib64/python2.7/rfc822.pyR?Rs  cCs-y||}Wntk r"dSXt|�S(s�Retrieve a date field from a header. Retrieves a date field from the named header, returning a tuple compatible with time.mktime(). N(tKeyErrorR R(RR0tdata((s/usr/lib64/python2.7/rfc822.pytgetdatehs  cCs-y||}Wntk r"dSXt|�S(s�Retrieve a date field from a header as a 10-tuple. The first 9 elements make up a tuple compatible with time.mktime(), and the 10th is the offset of the poster's time zone from GMT/UTC. N(RHR R(RR0RI((s/usr/lib64/python2.7/rfc822.pyt getdate_tzts  cCs t|j�S(s'Get the number of headers in a message.(R"R(R((s/usr/lib64/python2.7/rfc822.pyt__len__�scCs|j|j�S(s,Get a specific header, as from a dictionary.(RR+(RR0((s/usr/lib64/python2.7/rfc822.pyt __getitem__�scCsZ||=||j|j�<|d|}x+|jd�D]}|jj|d�q8WdS(s�Set the value of a header. Note: This is not a perfect inversion of __getitem__, because any changed headers get stuck at the end of the raw-headers list rather than where the altered header was. s: s N(RR+tsplitRR(RR0tvaluettextR'((s/usr/lib64/python2.7/rfc822.pyt __setitem__�s cCs�|j�}||jkrdS|j|=|d}t|�}g}d}xxtt|j��D]a}|j|}|| j�|kr�d}n|d j�s�d}n|ra|j|�qaqaWxt|�D]}|j|=q�WdS(s>Delete all occurrences of a specific header, if it is present.NR)ii(R+RR"trangeRR/Rtreversed(RR0R1R#R2R,R'((s/usr/lib64/python2.7/rfc822.pyt __delitem__�s$       RcCsw|j�}||jkr&|j|S|d|}x+|jd�D]}|jj|d�qDW||j|<|SdS(Ns: s (R+RRNRR(RR0R8t lowernameRPR'((s/usr/lib64/python2.7/rfc822.pyt setdefault�s   cCs|j�|jkS(s6Determine whether a message contains the named header.(R+R(RR0((s/usr/lib64/python2.7/rfc822.pythas_key�scCs|j�|jkS(s6Determine whether a message contains the named header.(R+R(RR0((s/usr/lib64/python2.7/rfc822.pyt __contains__�scCs t|j�S(N(titerR(R((s/usr/lib64/python2.7/rfc822.pyt__iter__�scCs |jj�S(s*Get all of a message's header field names.(Rtkeys(R((s/usr/lib64/python2.7/rfc822.pyR[�scCs |jj�S(s+Get all of a message's header field values.(Rtvalues(R((s/usr/lib64/python2.7/rfc822.pyR\�scCs |jj�S(sWGet all of a message's headers. Returns a list of name, value tuples. (Rtitems(R((s/usr/lib64/python2.7/rfc822.pyR]�scCsdj|j�S(NR(R5R(R((s/usr/lib64/python2.7/rfc822.pyt__str__�sN( t__name__t __module__t__doc__RRRR!R RR3R4R6R R9R7R>RAR?RJRKRLRMRQRTRVRWRXRZR[R\R]R^(((s/usr/lib64/python2.7/rfc822.pyRUs:   P                cCs�t|�dkr|jd�rS|jd�rS|dd!jdd�jdd�S|jd�r|jd�r|dd!Sn|S( sRemove quotes from a string.it"i����s\\s\s\"t<t>(R"Rtendswithtreplace(R=((s/usr/lib64/python2.7/rfc822.pytunquote�s #cCs|jdd�jdd�S(sAdd quotes around a string.s\s\\Rbs\"(Rf(R=((s/usr/lib64/python2.7/rfc822.pytquote�scCs't|�}|j}|sdS|dS(s3Parse an address into a (realname, mailaddr) tuple.iN(NN(RRBR (taddressRGR#((s/usr/lib64/python2.7/rfc822.pyt parseaddr�s   t AddrlistClasscBs�eZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z dd �Z d �Z d �Z d �Z dd �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. http://www.faqs.org/rfcs/rfc2822.html Note: this class interface is deprecated and may be removed in the future. Use rfc822.AddressList instead. cCsld|_d|_d|_d|_|j|j|j|_|jjdd�|_||_g|_dS(s�Initialize a new instance. `field' is an unparsed address header field, containing one or more addresses. s ()<>@,:;."[]is s t.RN( tspecialstpostLWStCRtatomendsRft phraseendstfieldt commentlist(RRs((s/usr/lib64/python2.7/rfc822.pyRs     cCs�x||jt|j�kr~|j|j|jdkrK|jd|_q|j|jdkrz|jj|j��qPqWdS(s*Parse up to the start of the next address.s it(N(RnR"RsRoRtRt getcomment(R((s/usr/lib64/python2.7/rfc822.pytgotonexts cCs9g}|j�}x |r4||7}|j�}qW|S(sVParse all addresses. Returns a list containing all of the addresses. (t getaddress(RR:tad((s/usr/lib64/python2.7/rfc822.pyR?s    cCs�g|_|j�|j}|j}|j�}|j�g}|jt|j�kr�|rPdj|j�|dfg}qPn�|j|jdkr�||_||_|j�}dj|j�|fg}nz|j|jdkr�g}t|j�}|jd7_x=|jt|j�kr�|j�|j|krm|j|jdkrm|jd7_Pn||j�}qWn�|j|jdkr�|j �}|jr�dj|�ddj|j�d |fg}qPdj|�|fg}nS|r%dj|j�|dfg}n+|j|j|j krP|jd7_n|j�|jt|j�kr�|j|jd kr�|jd7_n|S( sParse the next address.t is.@R)it;Rcs (t)t,( RtRwRnt getphraselistR"RsR5t getaddrspecRxt getrouteaddrRm(Rtoldpostoldcltplistt returnlisttaddrspectfieldlent routeaddr((s/usr/lib64/python2.7/rfc822.pyRx(sL      %    %  3" .cCs |j|jdkrdSd}|jd7_|j�d}x�|jt|j�kr|rs|j�d}n�|j|jdkr�|jd7_Pnr|j|jdkr�|jd7_d}nD|j|jdkr�|jd7_n|j�}|jd7_P|j�qBW|S( s�Parse a route address (Return-path value). This method just skips all the route stuff and returns the addrspec. RcNiiRRdt@R)(RsRnRwR"t getdomainR(Rt expectroutetadlist((s/usr/lib64/python2.7/rfc822.pyR�bs.     cCsFg}|j�x�|jt|j�kr�|j|jdkr`|jd�|jd7_n`|j|jdkr�|jd|j��n0|j|j|jkr�Pn|j|j��|j�qW|jt|j�ks�|j|jdkr dj|�S|jd�|jd7_|j�dj|�|j �S(sParse an RFC 2822 addr-spec.RliRbs"%s"R�R( RwRnR"RsRtgetquoteRqtgetatomR5R�(Rtaslist((s/usr/lib64/python2.7/rfc822.pyR�s$  .   cCsg}x|jt|j�kr|j|j|jkrL|jd7_q |j|jdkr{|jj|j��q |j|jdkr�|j|j��q |j|jdkr�|jd7_|jd�q |j|j|jkr�Pq |j|j ��q Wdj |�S(s-Get the complete domain name from an address.iRut[RlR( RnR"RsRoRtRRvtgetdomainliteralRqR�R5(Rtsdlist((s/usr/lib64/python2.7/rfc822.pyR��sicCs3|j|j|krdSdg}d}|jd7_x�|jt|j�kr%|dkr|j|j|j�d}n�|j|j|kr�|jd7_Pnk|r�|j|jdkr�|j|j��q;n6|j|jdkr�d}n|j|j|j�|jd7_q;Wdj|�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. RiiRus\(RsRnR"RRvR5(Rt beginchartendcharst allowcommentstslistRh((s/usr/lib64/python2.7/rfc822.pyt getdelimited�s(     cCs|jddd�S(s1Get a quote-delimited fragment from self's field.Rbs" i(R�(R((s/usr/lib64/python2.7/rfc822.pyR��scCs|jddd�S(s7Get a parenthesis-delimited fragment from self's field.Rus) i(R�(R((s/usr/lib64/python2.7/rfc822.pyRv�scCsd|jddd�S(s!Parse an RFC 2822 domain-literal.s[%s]R�s] i(R�(R((s/usr/lib64/python2.7/rfc822.pyR��scCs�dg}|dkr!|j}nx\|jt|j�kr|j|j|krVPn|j|j|j�|jd7_q$Wdj|�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 RqRnR"RsRR5(RRqtatomlist((s/usr/lib64/python2.7/rfc822.pyR��s   cCs�g}x�|jt|j�kr�|j|j|jkrL|jd7_q |j|jdkrx|j|j��q |j|jdkr�|jj|j��q |j|j|jkr�Pq |j|j |j��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. iRbRu( RnR"RsRoRR�RtRvRrR�(RR�((s/usr/lib64/python2.7/rfc822.pyR~�sN(R_R`RaRRwR?RxR�RR�R�R�RvR�R R�R~(((s/usr/lib64/python2.7/rfc822.pyRk�s   :   %    cBsVeZdZd�Zd�Zd�Zd�Zd�Zd�Zd�Z d�Z RS( s@An AddressList encapsulates a list of parsed RFC 2822 addresses.cCs5tj||�|r(|j�|_n g|_dS(N(RkRR?RB(RRs((s/usr/lib64/python2.7/rfc822.pyR scCs t|j�S(N(R"RB(R((s/usr/lib64/python2.7/rfc822.pyRLscCsdjtt|j��S(Ns, (R5tmaptdump_address_pairRB(R((s/usr/lib64/python2.7/rfc822.pyR^scCsStd�}|j|_x3|jD](}||jkr#|jj|�q#q#W|S(N(RR RBR(RtothertnewaddrR(((s/usr/lib64/python2.7/rfc822.pyt__add__s   cCs:x3|jD](}||jkr |jj|�q q W|S(N(RBR(RR�R(((s/usr/lib64/python2.7/rfc822.pyt__iadd__scCsFtd�}x3|jD](}||jkr|jj|�qqW|S(N(RR RBR(RR�R�R(((s/usr/lib64/python2.7/rfc822.pyt__sub__&s  cCs:x3|jD](}||jkr |jj|�q q W|S(N(RBtremove(RR�R(((s/usr/lib64/python2.7/rfc822.pyt__isub__.scCs |j|S(N(RB(Rtindex((s/usr/lib64/python2.7/rfc822.pyRM5s( R_R`RaRRLR^R�R�R�R�RM(((s/usr/lib64/python2.7/rfc822.pyRs      cCs2|dr&d|dd|ddS|dSdS(s4Dump a (name, address) pair in a canonicalized form.iRbs" <iRdN((tpair((s/usr/lib64/python2.7/rfc822.pyR�9s tjantfebtmartaprtmaytjuntjultaugtseptocttnovtdectjanuarytfebruarytmarchtapriltjunetjulytaugustt septembertoctobertnovembertdecembertmonttuetwedtthutfritsattsunitUTtUTCtGMTtZip���tASTi���tADTi ���tESTtEDTi����tCSTtCDTiD���tMSTtMDTi��tPSTtPDTc Cs�|s dS|j�}|dddks@|dj�tkrJ|d=n8|djd�}|dkr�|d|d|d<nt|�dkr�|djd�}t|�dkr�||d}q�nt|�dkr3|d}|jd �}|dkr#|| ||dg|d)q3|jd �nt|�d krIdS|d }|\}}}}}|j�}|tkr�||j�}}|tkr�dSntj |�d}|d kr�|d }n|ddkr�|d }n|jd �}|dkr||}}n|ddkr7|d }n|dj �sW||}}n|ddkrt|d }n|jd �}t|�dkr�|\} } d} n(t|�dkr�|\} } } ndSy@t |�}t |�}t | �} t | �} t | �} Wnt k r&dSXd} |j �}|tkrRt|} n$yt |�} Wnt k runX| r�| dkr�d} | } nd} | | dd| dd} n|||| | | ddd| f S(sQConvert a date string to a time tuple. Accounts for military timezones. ii����R}Rliit-it+Rii R)it0idii<N(R}Rl(R RNR+t _daynamestrfindR"R*Rt _monthnamesR�tisdigittintt ValueErrortuppert _timezones(RIR,tstuffR=tddtmmtyyttmttztthhttmmttssttzoffsetttzsign((s/usr/lib64/python2.7/rfc822.pyRWs� *                          !cCs$t|�}|dkr|S|d S(s&Convert a time string to a time tuple.i N(RR (RItt((s/usr/lib64/python2.7/rfc822.pyR�s  cCsS|ddkr%tj|d d�Stj|d d�}||dtjSdS(sCTurn a 10-tuple as returned by parsedate_tz() into a UTC timestamp.i ii����iN(i����(i(R ttimetmktimettimezone(RIR�((s/usr/lib64/python2.7/rfc822.pyR�scCso|dkrtj�}ntj|�}dd|d |d d|dd|d|d|d|dfS(s[Returns time format preferred for Internet standards. Sun, 06 Nov 1994 08:49:37 GMT ; RFC 822, updated by RFC 1123 According to RFC 1123, day and month names must always be in English. If not for that, this code could use strftime(). It can't because strftime() honors the locale and could generate non-English names. s#%s, %02d %s %04d %02d:%02d:%02d GMTtMontTuetWedtThutFritSattSuniitJantFebtMartAprtMaytJuntJultAugtSeptOcttNovtDeciiiiiN(R�R�R�R�R�R�R�( R�R�R�R�R�R�R�R�R�R�R�R�(R R�tgmtime(ttimeval((s/usr/lib64/python2.7/rfc822.pyt formatdate�s  t__main__tHOMEs Mail/inbox/1itrsFrom:tfromsTo:ttosSubject:tsubjectsDate:tdates ParsedDate:i<s %+03d%02ds.%02dsLines:R�iFslen =tDatesDate =s X-Nonsenseskeys =svalues =sitems =(5RaR�twarningsRt__all__R-RRgRhRjRkRR�R�R�R�RRRR R�R_tsystostpathR5tenvirontfiletargvtopentftmRAR?R9RKRR�t localtimetasctimethhmmsstdivmodthhmmtssthhR�RR1RR"R[R\R](((s/usr/lib64/python2.7/rfc822.pyt<module>Gs�   ��  �2  U