Hacked By AnonymousFox

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



���]c�@s�ddlZddlZddlZdddgZGdd�de�Zdddd�Zddddd�Zd	d
�Ze	dkr�e�dS)�N�Error�encode�decodec@seZdZdS)rN)�__name__�
__module__�__qualname__�rr�'/opt/alt/python35/lib64/python3.5/uu.pyr'scCs�g}z�|dkr$tjj}n�t|t�r�|dkrQtjj|�}|dkr�ytj|�j	}Wnt
k
r�YnXt|d�}|j|�|dkr�tj
j}n+t|t�r�t|d�}|j|�|dkr�d}|dkrd}|jd|d@|fjd��|jd�}x;t|�d	kr~|jtj|��|jd�}qDW|jd
�Wdx|D]}|j�q�WXdS)N�-�rb�wbi�zbegin %o %s
i��ascii�-rs 
end
)�sys�stdin�buffer�
isinstance�str�os�path�basename�stat�st_mode�AttributeError�open�append�stdout�writer�read�len�binasciiZb2a_uu�close)�in_file�out_file�name�mode�opened_files�data�frrr	r*s>


$
Fc
Cs�g}|dkr!tjj}n+t|t�rLt|d�}|j|�zcx�|j�}|sptd��|j	d�s�qR|j
dd�}t|�dkrR|ddkrRyt|d	d
�PWqRt
k
r�YqRXqRW|dkr/|djd�jd�}tjj|�r/td
|��|dkrNt|d	d
�}|dkritjj}n]t|t�r�t|d�}ytjj||�Wntk
r�YnX|}|j|�|j�}x�|r�|jd�dkr�ytj|�}	Wnytjk
r~}
zV|ddd@ddd}tj|d|��}	|sltjjd|
�WYdd}
~
XnX|j|	�|j�}q�W|s�td��Wdx|D]}|j�q�WXdS)Nr
rz'No valid begin line found in input filesbegin� ��r��s 	
r
z"Cannot overwrite existing file: %srsend� �?��zWarning: %s
zTruncated input file)rrrrrrr�readliner�
startswith�splitr�int�
ValueError�rstriprrr�existsr�chmodr�stripr Za2b_uu�stderrrr!)
r"r#r%�quietr&ZhdrZ	hdrfields�fp�sr'�v�nbytesr(rrr	rZsf
"
	

'

cCs�ddl}|jdd�}|jdddddd	d
ddd
�|jddddddd
ddd
�|j�\}}t|�dkr�|jd�tjd�tjj	}tj
j	}t|�dkr�|d}t|�dkr�|d}|jr`|jrPt
|t�r/t|d�}n!ttjdd�tjd�t||�nX|jr�t
|t�r�t|d�}n!ttjdd�tjd�t||�dS)Nr�usagez'usage: %prog [-d] [-t] [input [output]]z-dz--decode�destr�helpzDecode (instead of encode)?�defaultF�action�
store_truez-tz--text�textz2data is text, encoded format unix-compatible text?r*zincorrect number of argumentsr,rz: cannot do -t to stdoutrz: cannot do -t from stdin)�optparseZOptionParserZ
add_option�
parse_argsr�errorr�exitrrrrrGrrr�print�argvr)rH�parser�options�args�input�outputrrr	�test�s6((



		
	
rS�__main__)
r rr�__all__�	ExceptionrrrrSrrrrr	�<module>!s0F&

Hacked By AnonymousFox1.0, Coded By AnonymousFox