AlkantarClanX12

Your IP : 3.147.65.47


Current Path : /proc/self/root/opt/alt/python33/lib64/python3.3/email/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python33/lib64/python3.3/email/__pycache__/_parseaddr.cpython-33.pyo

�
��f/Cc@s�dZddddgZddlZddlZdZdZd	Zd
ddd
dddddddddddddddddddd gZd!d"d#d$d%d&d'gZidd(6dd)6dd*6dd+6d,d-6d.d/6d0d16d,d26d3d46d0d56d6d76d3d86d9d:6d6d;6Z	d<d�Z
d=d>�Zd?d�Zd@d�Z
dAd�ZGdBdC�dC�ZGdDdE�dEe�ZdS(FucEmail address parsing code.

Lifted directly from rfc822.py.  This should eventually be rewritten.
u	mktime_tzu	parsedateuparsedate_tzuquoteiNu uu, ujanufebumaruaprumayujunujuluaugusepuoctunovudecujanuaryufebruaryumarchuaprilujuneujulyuaugustu	septemberuoctoberunovemberudecemberumonutueuweduthuufriusatusunuUTuUTCuGMTuZi�uASTi,uADTi�uESTuEDTiXuCSTuCDTi�uMSTuMDTi uPSTuPDTcCs=t|�}|sdS|ddkr3d|d<nt|�S(uQConvert a date string to a time tuple.

    Accounts for military timezones.
    Ni	i(u
_parsedate_tzuNoneutuple(udataures((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyuparsedate_tz-s
cCs|s
dS|j�}|djd�s?|dj�tkrI|d=n>|djd�}|dkr�|d|dd�|d<nt|�dkr�|djd�}t|�dkr�||dd�}q�nt|�dkrj|d}|jd�}|dkr!|jd�}n|dkrZ|d|�||d�g|dd�<qj|jd	�nt|�d
kr�dS|dd
�}|\}}}}}|j�}|t	kr�||j�}}|t	kr�dSnt	j
|�d}|dkr|d8}n|ddkr2|dd�}n|jd�}|dkr]||}}n|ddkr�|dd�}n|dj�s�||}}n|ddkr�|dd�}n|jd�}t|�d
kr�|\}	}
d}n�t|�dkr|\}	}
}n�t|�dkr�d|dkr�|djd�}t|�d
kry|\}	}
d}q�t|�dkr�|\}	}
}q�ndSy@t|�}t|�}t|	�}	t|
�}
t|�}Wnt
k
r�dSYnX|dkr/|dkr"|d7}q/|d7}nd}|j�}|tkrZt|}nIyt|�}Wnt
k
r~YnX|dkr�|jd�r�d}n|r�|dkr�d}
|}nd}
|
|dd|dd}n||||	|
|ddd|g
S(u�Convert date to extended time tuple.

    The last (additional) element is the time zone offset in seconds, except if
    the timezone was specified as -0000.  In that case the last element is
    None.  This indicates a UTC timestamp that explicitly declaims knowledge of
    the source timezone, as opposed to a +0000 timestamp that indicates the
    source timezone really was UTC.

    Niu,iiu-iu+uiiu:iu0u.idiDili�ii<i����i����i����i����i����i����i����i����i����(usplituendswithuloweru	_daynamesurfindulenufinduappenduNoneu_monthnamesuindexuisdigituintu
ValueErroruupperu
_timezonesu
startswith(udatauiustuffusuddummuyyutmutzuthhutmmutssutzoffsetutzsign((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyu
_parsedate_tz9s�
)

-
	"	
	



	
!u
_parsedate_tzcCs1t|�}t|t�r)|dd�S|SdS(u&Convert a time string to a time tuple.Ni	(uparsedate_tzu
isinstanceutuple(udataut((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyu	parsedate�scCsJ|ddkr+tj|dd�d�Stj|�}||dSdS(uETurn a 10-tuple as returned by parsedate_tz() into a POSIX timestamp.i	Niii����(i����(uNoneutimeumktimeucalendarutimegm(udataut((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyu	mktime_tz�scCs|jdd�jdd�S(u�Prepare string to be used in a quoted string.

    Turns backslash and double quote characters into quoted pairs.  These
    are the only characters that need to be quoted inside a quoted string.
    Does not add the surrounding double quotes.
    u\u\\u"u\"(ureplace(ustr((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyuquote�scBs�|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
ddd�Zdd�Z
dd�Zdd�Zddd�Zdd�ZdS(u
AddrlistClassuAddress 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 email.utils.AddressList instead.
    cCsd|_d|_d|_d|_|j|j|_|j|j|j|_|jjdd�|_||_g|_	dS(u�Initialize a new instance.

        `field' is an unparsed address header field, containing
        one or more addresses.
        u()<>@,:;."[]iu 	u
u.uN(
uspecialsuposuLWSuCRuFWSuatomendsureplaceu
phraseendsufielducommentlist(uselfufield((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyu__init__�s					uAddrlistClass.__init__cCs�g}x�|jt|j�kr�|j|j|jdkr�|j|jdkrn|j|j|j�n|jd7_q	|j|jdkr�|jj|j��q	Pq	Wtj|�S(u&Skip white space and extract comments.u

iu((	uposulenufielduLWSuappenducommentlistu
getcommentuEMPTYSTRINGujoin(uselfuwslist((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyugotonext�suAddrlistClass.gotonextcCsUg}xH|jt|j�krP|j�}|r@||7}q	|jd�q	W|S(uVParse all addresses.

        Returns a list containing all of the addresses.
        u(uu(uposulenufieldu
getaddressuappend(uselfuresultuad((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyugetaddrlist�s
uAddrlistClass.getaddrlistcCs�g|_|j�|j}|j}|j�}|j�g}|jt|j�kr�|rPtj|j�|dfg}qPn�|j|jdkr�||_||_|j�}tj|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�tj|�ddj|j�d	|fg}qPtj|�|fg}nS|r%tj|j�|dfg}n+|j|j|jkrP|jd7_n|j�|jt|j�kr�|j|jd
kr�|jd7_n|S(uParse the next address.iu.@u:iu;u<u (u u)u,(ucommentlistugotonextuposu
getphraselistulenufielduSPACEujoinugetaddrspecu
getaddressugetrouteaddruspecials(uselfuoldposuoldcluplistu
returnlistuaddrspecufieldlenu	routeaddr((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyu
getaddresssL	
		
%		
%	3"
.uAddrlistClass.getaddresscCs |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(
u�Parse a route address (Return-path value).

        This method just skips all the route stuff and returns the addrspec.
        u<Niuu>u@u:FT(ufielduposuFalseugotonextulenu	getdomainuTrueugetaddrspec(uselfuexpectrouteuadlist((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyugetrouteaddr?s.

		uAddrlistClass.getrouteaddrcCs�g}|j�x3|jt|j�krEd}|j|jdkr�|rk|dj�rk|j�n|jd�|jd7_d}n�|j|jdkr�|jdt	|j
���nT|j|j|jkr|r|d	j�r|j�nPn|j|j��|j�}|r|r|j|�qqW|jt|j�kst|j|jdkr�t
j|�S|jd�|jd7_|j�t
j|�|j�S(
uParse an RFC 2822 addr-spec.u.iu"u"%s"u@Ti����Fi����(ugotonextuposulenufielduTrueustripupopuappenduFalseuquoteugetquoteuatomendsugetatomuEMPTYSTRINGujoinu	getdomain(uselfuaslistupreserve_wsuws((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyugetaddrspec_s4


	 
.


uAddrlistClass.getaddrspeccCsg}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	Wt
j|�S(u-Get the complete domain name from an address.iu(u[u.(uposulenufielduLWSucommentlistuappendu
getcommentugetdomainliteraluatomendsugetatomuEMPTYSTRINGujoin(uselfusdlist((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyu	getdomain�suAddrlistClass.getdomaincCs-|j|j|krdSdg}d}|jd7_x�|jt|j�kr|ry|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;Wtj|�S(u�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.
        uiu(u\FT(	ufielduposuFalseulenuappendu
getcommentuTrueuEMPTYSTRINGujoin(uselfu	begincharuendcharsu
allowcommentsuslistuquote((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyugetdelimited�s(
			uAddrlistClass.getdelimitedcCs|jddd�S(u1Get a quote-delimited fragment from self's field.u"u"
F(ugetdelimiteduFalse(uself((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyugetquote�suAddrlistClass.getquotecCs|jddd�S(u7Get a parenthesis-delimited fragment from self's field.u(u)
T(ugetdelimiteduTrue(uself((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyu
getcomment�suAddrlistClass.getcommentcCsd|jddd�S(u!Parse an RFC 2822 domain-literal.u[%s]u[u]
F(ugetdelimiteduFalse(uself((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyugetdomainliteral�suAddrlistClass.getdomainliteralcCs�dg}|dkr!|j}nx\|jt|j�kr|j|j|krVPn|j|j|j�|jd7_q$Wtj|�S(uParse 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).uiN(uNoneuatomendsuposulenufielduappenduEMPTYSTRINGujoin(uselfuatomendsuatomlist((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyugetatom�s	uAddrlistClass.getatomcCs�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(u�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.
        iu"u((
uposulenufielduFWSuappendugetquoteucommentlistu
getcommentu
phraseendsugetatom(uselfuplist((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyu
getphraselist�suAddrlistClass.getphraselistNT(u__name__u
__module__u__qualname__u__doc__u__init__ugotonextugetaddrlistu
getaddressugetrouteaddrugetaddrspecu	getdomainuTrueugetdelimitedugetquoteu
getcommentugetdomainliteraluNoneugetatomu
getphraselist(u
__locals__((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyu
AddrlistClass�s; !%u
AddrlistClasscBsn|EeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS(uAddressListu@An AddressList encapsulates a list of parsed RFC 2822 addresses.cCs5tj||�|r(|j�|_n	g|_dS(N(u
AddrlistClassu__init__ugetaddrlistuaddresslist(uselfufield((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyu__init__�suAddressList.__init__cCs
t|j�S(N(ulenuaddresslist(uself((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyu__len__�suAddressList.__len__cCs\td�}|jdd�|_x3|jD](}||jkr,|jj|�q,q,W|S(N(uAddressListuNoneuaddresslistuappend(uselfuotherunewaddrux((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyu__add__�suAddressList.__add__cCs:x3|jD](}||jkr
|jj|�q
q
W|S(N(uaddresslistuappend(uselfuotherux((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyu__iadd__suAddressList.__iadd__cCsFtd�}x3|jD](}||jkr|jj|�qqW|S(N(uAddressListuNoneuaddresslistuappend(uselfuotherunewaddrux((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyu__sub__s
uAddressList.__sub__cCs:x3|jD](}||jkr
|jj|�q
q
W|S(N(uaddresslisturemove(uselfuotherux((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyu__isub__suAddressList.__isub__cCs|j|S(N(uaddresslist(uselfuindex((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyu__getitem__suAddressList.__getitem__N(u__name__u
__module__u__qualname__u__doc__u__init__u__len__u__add__u__iadd__u__sub__u__isub__u__getitem__(u
__locals__((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyuAddressList�s	uAddressList(u__doc__u__all__utimeucalendaruSPACEuEMPTYSTRINGu
COMMASPACEu_monthnamesu	_daynamesu
_timezonesuparsedate_tzu
_parsedate_tzu	parsedateu	mktime_tzuquoteu
AddrlistClassuAddressList(((u5/opt/alt/python33/lib64/python3.3/email/_parseaddr.pyu<module>s6	u	

�%