AlkantarClanX12

Your IP : 3.145.33.244


Current Path : /opt/alt/python35/lib64/python3.5/email/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/email/__pycache__/quoprimime.cpython-35.opt-2.pyc



���]�&�
@s�dddddddddd	g
Zd
dlZd
dlmZmZmZd
ZdZdZdd�e	d�D�Z
e
dd�Ze
dd�Zx8dej
d�ej
d�D]Zee�ee<q�Wdeed�<xdD]Zee�ee<q�Wdd�Zdd�Zdd�Zdd�Zddd�Zd d	�Zd!d�Zd"d#d�Zedd�Zxd$D]Zee�ee<q�Wd%ed&d�Zed'd�ZeZeZd(d)�Zd*d�ZdS)+�body_decode�body_encode�body_length�decode�decodestring�
header_decode�
header_encode�
header_length�quote�unquote�N)�
ascii_letters�digits�	hexdigitsz
�
�cCsg|]}d|�qS)z=%02X�)�.0�crr�//opt/alt/python35/lib64/python3.5/quoprimime.py�
<listcomp>7s	r�s-!*+/�ascii�_� s_ !"#$%&'()*+,-./0123456789:;<>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\]^_`abcdefghijklmnopqrstuvwxyz{|}~	cCst|�t|kS)N)�chr�_QUOPRI_HEADER_MAP)�octetrrr�header_checkJsrcCst|�t|kS)N)r�_QUOPRI_BODY_MAP)rrrr�
body_checkOsrcCstdd�|D��S)Ncss|]}tt|�VqdS)N)�lenr)rrrrr�	<genexpr>^sz header_length.<locals>.<genexpr>)�sum)�	bytearrayrrrrTs
cCstdd�|D��S)Ncss|]}tt|�VqdS)N)r r)rrrrrr!hszbody_length.<locals>.<genexpr>)r")r#rrrrascCs�t|t�st|�}|s7|j|j��nHt|d�t|�|krl|d||7<n|j|j��dS)N����r%)�
isinstance�strr�append�lstripr )�L�s�maxlen�extrarrr�_max_appendks r.cCstt|dd�d��S)Nr$��)r�int)r+rrrr
vscCstt|�S)N)�_QUOPRI_MAP�ord)rrrrr	{sz
iso-8859-1cCs0|s
dS|jd�jt�}d||fS)Nr�latin1z=?%s?q?%s?=)r�	translater)Zheader_bytes�charset�encodedrrrrss
�Lc
Cs�|dkrtd��|s"|S|jt�}d|}|d}g}|j}xv|j�D]h}d}t|�d|}	x�||	kr)||}
||
ddkr�||||
d��|
d}q�||
ddkr||||
��|
d}q�||||
�d�|
}q�W|r�|d
dkr�||	}|dkrit|d�}n1|dkr�|d|}n|t|d
�}|||d�|�qa|||d��qaW|dtkr�|d	�|j|�S)N�zmaxlinelen must be at least 4�=r$r�z 	r/rr%r%r%r%r%r%)	�
ValueErrorr5�_QUOPRI_BODY_ENCODE_MAPr(�
splitlinesr r	�CRLF�join)
ZbodyZ
maxlinelen�eolZ
soft_breakZmaxlinelen1Zencoded_bodyr(�line�startZ	laststart�stopZroom�qrrrr�sD

	





cCsx|s
|Sd}x2|j�D]$}|j�}|sB||7}qd}t|�}x�||kr@||}|dkr�||7}|d7}n�|d|kr�|d7}qWnw|d|kr||dtkr||dtkr|t|||d��7}|d7}n||7}|d7}||krW||7}qWWqW|ddkrt|j|�rt|dd	�}|S)
Nrrr:r$r;r/z
r%r%)r>�rstripr rr
�endswith)r7rAZdecodedrB�i�nrrrrr�s8




8


cCs|jd�}t|�S)Nr)�groupr
)�matchr+rrr�_unquote_matchsrLcCs.|jdd�}tjdt|dtj�S)Nrrz=[a-fA-F0-9]{2}�flags)�replace�re�subrL�ASCII)r+rrrr#s) �__all__rO�stringrr
rr?�NLZEMPTYSTRING�ranger2rr�encoderrr3rrrrr.r
r	rr=rrrrrLrrrrr�<module>sN	'



O0