MINI MINI MANI MO

Path : /lib64/python2.7/
File Upload :
Current File : //lib64/python2.7/uu.pyo

ó
Cě]c@s“dZddlZddlZddlZdddgZdefd„ƒYZddd„Zdddd	„Z	d
„Z
edkre
ƒndS(sƒImplementation of the UUencode and UUdecode functions.

encode(in_file, out_file [,name, mode])
decode(in_file [, out_file, mode])
i˙˙˙˙NtErrortencodetdecodecBseZRS((t__name__t
__module__(((s/usr/lib64/python2.7/uu.pyR'scCs˛g}z‰|dkr!tj}nˆt|tƒrŠ|d
krQtjj|ƒ}n|d
krŠytj|ƒj	}WqŠt
k
r†qŠXnt|dƒ}|j|ƒn|dkrÁtj
}n.t|tƒrďt|dƒ}|j|ƒn|d
krd}n|d
krd}n|jd|d@|fƒ|jdƒ}x;t|ƒdkr€|jtj|ƒƒ|jdƒ}qFW|jd	ƒWd
x|D]}|jƒq™WXd
S(s
Uuencode filet-trbtwbiśsbegin %o %s
i˙i-is 
end
N(tsyststdint
isinstancet
basestringtNonetostpathtbasenametstattst_modetAttributeErrortopentappendtstdouttwritetreadtlentbinasciitb2a_uutclose(tin_filetout_filetnametmodetopened_filestdatatf((s/usr/lib64/python2.7/uu.pyR*s>
		
ic
CsĘg}|dkrtj}n+t|tƒrIt|ƒ}|j|ƒnz^xĄtrď|jƒ}|svtdƒ‚n|j	dƒs‹qOn|j
ddƒ}t|ƒdkrO|ddkrOyt|dd	ƒPWqět
k
rčqěXqOqOW|dkr4|djƒ}tjj|ƒr4td
|ƒ‚q4n|dkrVt|dd	ƒ}n|dkrntj}n_t|tƒrÍt|dƒ}ytjj||ƒWntk
rśnX|}|j|ƒn|jƒ}xľ|r|jƒdkrytj|ƒ}	Wnjtjk
rs}
t|dƒd
d@ddd}tj|| ƒ}	|sttjjd|
ƒqtnX|j|	ƒ|jƒ}qÜW|sŚtdƒ‚nWdx|D]}|jƒqąWXdS(sDecode uuencoded fileRs'No valid begin line found in input filetbegint iiiiis"Cannot overwrite existing file: %sRtendi i?iisWarning: %s
sTruncated input fileN(RR	R
RRRtTruetreadlineRt
startswithtsplitRtintt
ValueErrorRtrstripR
RtexistsRtchmodRtstripRta2b_uutordtstderrRR(
RRRtquietR thdrt	hdrfieldstfptsR!tvtnbytesR"((s/usr/lib64/python2.7/uu.pyRZsf	"

$

cCs˝ddl}|jddƒ}|jddddd	d
dtdd
ƒ|jddddd	ddtdd
ƒ|jƒ\}}t|ƒdkrŻ|jdƒtjdƒntj	}tj
}t|ƒdkrŕ|d}nt|ƒdkr˙|d}n|jrb|jrRt
|tƒr2t|dƒ}qRtjdGdGHtjdƒnt||ƒnW|jrŹt
|tƒrŒt|dƒ}qŹtjdGdGHtjdƒnt||ƒdS(suuencode/uudecode main programi˙˙˙˙Ntusages'usage: %prog [-d] [-t] [input [output]]s-ds--decodetdestRthelpsDecode (instead of encode)?tdefaulttactiont
store_trues-ts--textttexts2data is text, encoded format unix-compatible text?isincorrect number of argumentsiitws: cannot do -t to stdouttrs: cannot do -t from stdin(toptparsetOptionParsert
add_optiontFalset
parse_argsRterrorRtexitR	RRR@R
RRtargvR(RCtparsertoptionstargstinputtoutput((s/usr/lib64/python2.7/uu.pyttestžs6((
		

			t__main__(t__doc__RR
Rt__all__t	ExceptionRRRRRPR(((s/usr/lib64/python2.7/uu.pyt<module>s0D	%

OHA YOOOO