AlkantarClanX12

Your IP : 3.142.130.242


Current Path : /opt/alt/python35/lib64/python3.5/encodings/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/encodings/__pycache__/uu_codec.cpython-35.opt-1.pyc



��Yf�
�@s�dZddlZddlZddlmZddddd�Zdd	d
�ZGdd�dej�ZGd
d�dej�ZGdd�dej	�Z	Gdd�deej
�Z
Gdd�deej�Zdd�ZdS)aPython 'uu_codec' Codec - UU content transfer encoding.

This codec de/encodes from bytes to bytes.

Written by Marc-Andre Lemburg (mal@lemburg.com). Some details were
adapted from uu.py which was written by Lance Ellinghouse and
modified by Jack Jansen and Fredrik Lundh.
�N)�BytesIO�strictz<data>i�c	Cs�t|�}t�}|j}|j}|d|d@|fjd��|d�}x)|r|tj|��|d�}qWW|d�|j�t|�fS)Nzbegin %o %s
i��ascii�-s 
end
)r�read�write�encode�binasciiZb2a_uu�getvalue�len)	�input�errors�filename�mode�infile�outfilerr�chunk�r�7/opt/alt/python35/lib64/python3.5/encodings/uu_codec.py�	uu_encodes			!	
rc
Cs+t|�}t�}|j}|j}x6|�}|sEtd��|dd�dkr*Pq*Wx�|�}|s|dkr�Pytj|�}Wn_tjk
r�}z<|ddd@ddd	}	tj|d|	��}WYdd}~XnX||�qcW|std
��|j�t|�fS)Nz"Missing "begin" line in input data�sbeginsend
r� �?��zTruncated input data)	r�readliner�
ValueErrorr	Za2b_uu�Errorr
r)
rr
rrrr�s�data�v�nbytesrrr�	uu_decode!s.					,r"c@s.eZdZddd�Zddd�ZdS)�CodecrcCs
t||�S)N)r)�selfrr
rrrrCszCodec.encodecCs
t||�S)N)r")r$rr
rrr�decodeFszCodec.decodeN)�__name__�
__module__�__qualname__rr%rrrrr#Bsr#c@seZdZddd�ZdS)�IncrementalEncoderFcCst||j�dS)Nr)rr
)r$r�finalrrrrJszIncrementalEncoder.encodeN)r&r'r(rrrrrr)Isr)c@seZdZddd�ZdS)�IncrementalDecoderFcCst||j�dS)Nr)r"r
)r$rr*rrrr%NszIncrementalDecoder.decodeN)r&r'r(r%rrrrr+Msr+c@seZdZeZdS)�StreamWriterN)r&r'r(�bytes�charbuffertyperrrrr,Qsr,c@seZdZeZdS)�StreamReaderN)r&r'r(r-r.rrrrr/Tsr/cCs:tjdddtdtdtdtdtdtd	d
�S)N�name�uurr%�incrementalencoder�incrementaldecoder�streamreader�streamwriter�_is_text_encodingF)�codecs�	CodecInforr"r)r+r/r,rrrr�getregentryYs	r9)
�__doc__r7r	�iorrr"r#r)r+r,r/r9rrrr�<module>s!