ok

Mini Shell

Direktori : /proc/self/root/opt/alt/python37/lib64/python3.7/encodings/__pycache__/
Upload File :
Current File : //proc/self/root/opt/alt/python37/lib64/python3.7/encodings/__pycache__/uu_codec.cpython-37.pyc

B

�x�c#�@s�dZddlZddlZddlmZddd�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�strict�<data>�c	Cs�|dkst�t|�}t�}|j}|j}|�dd�}|�dd�}|d|d@|f�d��|d	�}x|r~|t�|��|d	�}qbW|d
�|��t	|�fS)Nr�
z\n�
z\rzbegin %o %s
i��ascii�-s 
end
)
�AssertionErrorr�read�write�replace�encode�binasciiZb2a_uu�getvalue�len)	�input�errors�filename�mode�infile�outfilerr�chunk�r�7/opt/alt/python37/lib64/python3.7/encodings/uu_codec.py�	uu_encodesrc

Cs�|dkst�t|�}t�}|j}|j}x(|�}|s:td��|dd�dkr(Pq(Wx�|�}|rd|dkrfPyt�|�}WnRtjk
r�}z2|ddd@d	dd
}	t�|d|	��}Wdd}~XYnX||�qRW|s�td��|��t	|�fS)Nrz"Missing "begin" line in input data�sbeginsend
r� �?��zTruncated input data)
r
r�readliner�
ValueErrorrZa2b_uu�Errorrr)
rrrrr!r�s�data�v�nbytesrrr�	uu_decode%s0$r(c@s eZdZddd�Zddd�ZdS)	�CodecrcCs
t||�S)N)r)�selfrrrrrrGszCodec.encodecCs
t||�S)N)r()r*rrrrr�decodeJszCodec.decodeN)r)r)�__name__�
__module__�__qualname__rr+rrrrr)Fs
r)c@seZdZddd�ZdS)�IncrementalEncoderFcCst||j�dS)Nr)rr)r*r�finalrrrrNszIncrementalEncoder.encodeN)F)r,r-r.rrrrrr/Msr/c@seZdZddd�ZdS)�IncrementalDecoderFcCst||j�dS)Nr)r(r)r*rr0rrrr+RszIncrementalDecoder.decodeN)F)r,r-r.r+rrrrr1Qsr1c@seZdZeZdS)�StreamWriterN)r,r-r.�bytes�charbuffertyperrrrr2Usr2c@seZdZeZdS)�StreamReaderN)r,r-r.r3r4rrrrr5Xsr5c
Cstjdttttttdd�S)N�uuF)�namerr+�incrementalencoder�incrementaldecoder�streamreader�streamwriter�_is_text_encoding)�codecs�	CodecInforr(r/r1r5r2rrrr�getregentry]sr?)rrr)r)
�__doc__r=r�iorrr(r)r/r1r2r5r?rrrr�<module>s

!

Zerion Mini Shell 1.0