tzh
2024-08-22 c7d0944258c7d0943aa7b2211498fd612971ce27
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
M\¬Qc@s“dZddlZddlZddlZdddgZdefd„ƒYZddd„Zdddd    „Z    d
„Z
e d kr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__(((sJ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/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((sJ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/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
R RRtTruetreadlineRt
startswithtsplitRtintt
ValueErrorR trstripR RtexistsRtchmodRtstripRta2b_uutordtstderrRR( RRRtquietR thdrt    hdrfieldstfptsR!tvtnbytesR"((sJ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/uu.pyRZsf        "        $  c Cs½ddl}|jddƒ}|jddddd    d
d td d ƒ|jddddd    dd td d ƒ|jƒ\}}t|ƒdkr¯|jdƒtjdƒntj    }tj
}t|ƒdkrà|d}nt|ƒdkrÿ|d}n|j rb|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
R RtargvR(RCtparsertoptionstargstinputtoutput((sJ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/uu.pyttestžs6 ((                       t__main__( t__doc__RR Rt__all__t    ExceptionRR RRRPR(((sJ/tmp/ndk-User/buildhost/install/prebuilt/darwin-x86_64/lib/python2.7/uu.pyt<module>s   0D    %