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



]c@sddlZddlZddlZdddgZGdddeZddddZdddddZd	d
Ze	dkredS)NErrorencodedecodec@seZdZdS)rN)__name__
__module____qualname__rr'/opt/alt/python35/lib64/python3.5/uu.pyr'scCsg}z|dkr$tjj}nt|tr|dkrQtjj|}|dkrytj|j	}Wnt
k
rYnXt|d}|j||dkrtj
j}n+t|trt|d}|j||dkrd}|dkrd}|jd|d@|fjd|jd}x;t|d	kr~|jtj||jd}qDW|jd
Wdx|D]}|jqWXdS)N-rbwbizbegin %o %s
iascii-rs 
end
)sysstdinbuffer
isinstancestrospathbasenamestatst_modeAttributeErroropenappendstdoutwriterreadlenbinasciiZb2a_uuclose)in_fileout_filenamemodeopened_filesdatafrrr	r*s>


$
Fc
Csg}|dkr!tjj}n+t|trLt|d}|j|zcx|j}|sptd|j	dsqR|j
dd}t|dkrR|ddkrRyt|d	d
PWqRt
k
rYqRXqRW|dkr/|djdjd}tjj|r/td
||dkrNt|d	d
}|dkritjj}n]t|trt|d}ytjj||Wntk
rYnX|}|j||j}x|r|jddkrytj|}	Wnytjk
r~}
zV|ddd@ddd}tj|d|}	|sltjjd|
WYdd}
~
XnX|j|	|j}qW|stdWdx|D]}|jqWXdS)Nr
rz'No valid begin line found in input filesbegin rs 	
r
z"Cannot overwrite existing file: %srsend ?zWarning: %s
zTruncated input file)rrrrrrrreadliner
startswithsplitrint
ValueErrorrstriprrrexistsrchmodrstripr Za2b_uustderrrr!)
r"r#r%quietr&ZhdrZ	hdrfieldsfpsr'vnbytesr(rrr	rZsf
"
	

'

cCsddl}|jdd}|jdddddd	d
ddd
|jddddddd
ddd
|j\}}t|dkr|jdtjdtjj	}tj
j	}t|dkr|d}t|dkr|d}|jr`|jrPt
|tr/t|d}n!ttjddtjdt||nX|jrt
|trt|d}n!ttjddtjdt||dS)Nrusagez'usage: %prog [-d] [-t] [input [output]]z-dz--decodedestrhelpzDecode (instead of encode)?defaultFaction
store_truez-tz--texttextz2data 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_argsrerrorrexitrrrrrGrrrprintargvr)rHparseroptionsargsinputoutputrrr	tests6((



		
	
rS__main__)
r rr__all__	ExceptionrrrrSrrrrr	<module>!s0F&
Back to Directory File Manager