AlkantarClanX12
Current Path : /lib64/python3.6/encodings/__pycache__/ |
Current File : //lib64/python3.6/encodings/__pycache__/uu_codec.cpython-36.pyc |
3 \� � @ s� d Z ddlZddlZddlmZ ddd�Zdd d �ZG dd� dej�ZG d d� dej�ZG dd� dej �Z G dd� deej �Z G dd� deej�Zdd� ZdS )a Python '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 C s� |dkst �t| �}t� }|j}|j}|d|d@ |f jd�� |d�}x|rf|tj|�� |d�}qJW |d� |j� t| �fS )Nr zbegin %o %s i� �ascii�- s end ) �AssertionErrorr �read�write�encode�binasciiZb2a_uu�getvalue�len) �input�errors�filename�mode�infile�outfiler r �chunk� r �*/usr/lib64/python3.6/encodings/uu_codec.py� uu_encode s r c C s� |dkst �t| �}t� }|j}|j}x(|� }|s:td��|d d� dkr(P q(W x�|� }| sf|dkrhP ytj|�}W nR tjk r� } z4|d d d@ d d d } tj|d | � �}W Y d d }~X nX ||� qRW |s�td��|j� t | �fS )Nr z"Missing "begin" line in input data� s begins end r � �? � � zTruncated input data) r r �readliner � ValueErrorr Za2b_uu�Errorr r ) r r r r r r �s�data�v�nbytesr r r � uu_decode! s0 $r% c @ s e Zd Zddd�Zddd�ZdS ) �Codecr c C s t ||�S )N)r )�selfr r r r r r C s zCodec.encodec C s t ||�S )N)r% )r'