%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python2.7/
Upload File :
Create Path :
Current File : //usr/local/lib/python2.7/uu.pyo

ó
Mźįac@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/local/lib/python2.7/uu.pyR'scCsÖg}z­|dkr!tj}nˆt|tƒr©|dkrQtjj|ƒ}n|dkrŠytj|ƒj	}WqŠt
k
r†qŠXnt|dƒ}|j|ƒn|dkrĮtj
}n.t|tƒrļt|dƒ}|j|ƒn|dkrd}n|dkrd}n|jddƒ}|jddƒ}|jd	|d
@|fƒ|jdƒ}x;t|ƒdkr¤|jtj|ƒƒ|jdƒ}qjW|jd
ƒWdx|D]}|jƒq½WXdS(s
Uuencode filet-trbtwbi¶s
s\ns
s\rsbegin %o %s
i’i-is 
end
N(tsyststdint
isinstancet
basestringtNonetostpathtbasenametstattst_modetAttributeErrortopentappendtstdouttreplacetwritetreadtlentbinasciitb2a_uutclose(tin_filetout_filetnametmodetopened_filestdatatf((s/usr/local/lib/python2.7/uu.pyR*sB
		
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(
RRR tquietR!thdrt	hdrfieldstfptsR"tvtnbytesR#((s/usr/local/lib/python2.7/uu.pyRasf	"

$

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	RRRAR
RRtargvR(RDtparsertoptionstargstinputtoutput((s/usr/local/lib/python2.7/uu.pyttest„s6((
		

			t__main__(t__doc__RR
Rt__all__t	ExceptionRRRRRQR(((s/usr/local/lib/python2.7/uu.pyt<module>s7D	%

Zerion Mini Shell 1.0