ACC SHELL

Path : /usr/lib/python/
File Upload :
Current File : //usr/lib/python/mimetools.pyo

Ñò
oÄMc@sÕdZddkZddkZddkZddklZlZeƒiiƒz.ei	oedde
ƒnddkZWdQXddklZeddd	ƒd
ddd
ddgZ
d
eifd„ƒYZyddkZWnej
oddkZnXeiƒZ[dad„Zdad„Zd„Zd„ZdZhed6ed6ed6ed6dd6dd6Zhdd6dd6dd6dd6d d6d!d6Zd"„Zd#„Zd$„Z d%„Z!dS(&s<Various tools used by MIME-reading or MIME-writing programs.iÿÿÿÿN(tfilterwarningstcatch_warningstignores.*rfc822 has been removed(twarnpy3ks@in 3.x, mimetools has been removed in favor of the email packaget
stacklevelitMessagetchoose_boundarytencodetdecodetcopyliteralt
copybinarycBskeZdZdd„Zd„Zd„Zd„Zd„Zd„Zd„Z	d	„Z
d
„Zd„ZRS(sˆA derived class of rfc822.Message that knows about MIME headers and
    contains some hooks for decoding encoded and multipart messages.icCsRtii|||ƒ|idƒ|_|idƒ|_|iƒ|iƒdS(Nscontent-transfer-encodingscontent-type(trfc822Rt__init__t	getheadertencodingheadert
typeheadert	parsetypet
parseplist(tselftfptseekable((s/usr/lib/python2.6/mimetools.pyRs

cCsß|i}|djo
d}nd|jo*|idƒ}|||_|| }n
d|_|idƒ}x4tt|ƒƒD] }||iƒiƒ||<q‚Wdi	|ƒ|_
|d|_di	|dƒ|_dS(Ns
text/plaint;tt/ii(
RtNonetindext	plisttexttsplittrangetlentstriptlowertjointtypetmaintypetsubtype(Rtstrtitfields((s/usr/lib/python2.6/mimetools.pyR!s	



	
cCsÛ|i}g|_xÂ|d djo°|d}d|jo|idƒ}n
t|ƒ}|| }d|jo?|idƒ}|| iƒiƒd||diƒ}n|ii|iƒƒ||}qWdS(NiRt=(RtplistRRRRtappend(RR$tendtfR%((s/usr/lib/python2.6/mimetools.pyR2s		



0cCs|iS(N(R((R((s/usr/lib/python2.6/mimetools.pytgetplistDscCsW|iƒd}t|ƒ}x4|iD])}|| |joti||ƒSq&WdS(NR'(RRR(RtunquoteR(Rtnametntp((s/usr/lib/python2.6/mimetools.pytgetparamGs
cCsUg}xH|iD]=}|idƒ}|djo|i|| iƒƒqqW|S(NR'i(R(tfindR)R(RtresultR0R%((s/usr/lib/python2.6/mimetools.pyt
getparamnamesOs

cCs"|idjodS|iiƒS(Nt7bit(RRR(R((s/usr/lib/python2.6/mimetools.pytgetencodingWscCs|iS(N(R!(R((s/usr/lib/python2.6/mimetools.pytgettype\scCs|iS(N(R"(R((s/usr/lib/python2.6/mimetools.pytgetmaintype_scCs|iS(N(R#(R((s/usr/lib/python2.6/mimetools.pyt
getsubtypebs(
t__name__t
__module__t__doc__RRRR,R1R4R6R7R8R9(((s/usr/lib/python2.6/mimetools.pyRs									icCs(tiƒtd7at}tiƒ|S(Ni(t
_counter_locktacquiret_countertrelease(R3((s/usr/lib/python2.6/mimetools.pyt_get_next_counterss



cCsõddk}tdjoÂddk}y|i|iƒƒ}Wn|ij
o
d}nXytti	ƒƒ}Wnt
j
o
d}nXyttiƒƒ}Wnt
j
o
d}nX|d|d|andt|iƒtƒfS(sxReturn a string usable as a multipart boundary.

    The string chosen is unique within a single program run, and
    incorporates the user id (if available), process id (if available),
    and current time.  So it's very unlikely the returned string appears
    in message text, but there's no guarantee.

    The boundary contains dots so you have to quote it in the header.iÿÿÿÿNs	127.0.0.1t1t.s
%s.%.3f.%d(
ttimet_prefixRtsockett
gethostbynametgethostnametgaierrortreprtostgetuidtAttributeErrortgetpidRA(RDRFthostidtuidtpid((s/usr/lib/python2.6/mimetools.pyR}s"
cCsÕ|djoddk}|i||ƒS|djoddk}|i||ƒS|djoddk}|i||ƒS|d
jo|i|iƒƒS|tjot|t||ƒntd|‚dS(sDDecode common content-transfer-encodings (base64, quopri, uuencode).tbase64iÿÿÿÿNsquoted-printabletuuencodes
x-uuencodetuuesx-uueR5t8bits%unknown Content-Transfer-Encoding: %s(RSs
x-uuencodeRTsx-uue(s7bitRU(	RRRtquoprituutwritetreadt	decodetabtpipethrought
ValueError(tinputtoutputtencodingRRRVRW((s/usr/lib/python2.6/mimetools.pyRs




cCsØ|djoddk}|i||ƒS|djo ddk}|i||dƒS|d
joddk}|i||ƒS|djo|i|iƒƒS|tjot|t||ƒntd|‚dS(sDEncode common content-transfer-encodings (base64, quopri, uuencode).RRiÿÿÿÿNsquoted-printableiRSs
x-uuencodeRTsx-uueR5RUs%unknown Content-Transfer-Encoding: %s(suuencodes
x-uuencodesuuesx-uue(s7bits8bit(	RRRRVRWRXRYt	encodetabR[R\(R]R^R_RRRVRW((s/usr/lib/python2.6/mimetools.pyR°s




sa(
TEMP=/tmp/@uu.$$
sed "s%^begin [0-7][0-7]* .*%begin 600 $TEMP%" | uudecode
cat $TEMP
rm $TEMP
)RSs
x-uuencodeRTsx-uuesmmencode -u -qsquoted-printablesmmencode -u -bRRsuuencode tempfilesmmencode -qsmmencode -bcCs-ti|dƒ}t||ƒ|iƒdS(Ntw(RKtpopenR	tclose(R]tcommandtpipe((s/usr/lib/python2.6/mimetools.pytpipetoàs
cCs}tiƒ\}}ti|dƒ}t||ƒ|iƒti|d|dƒ}t||ƒ|iƒti|ƒdS(NRas <tr(	ttempfiletmkstempRKtfdopenR	RcRbR
tunlink(R]RdR^tfdttempnamettempRe((s/usr/lib/python2.6/mimetools.pyR[ås



cCs/x(|iƒ}|pPn|i|ƒqdS(N(treadlineRX(R]R^tline((s/usr/lib/python2.6/mimetools.pyR	ïs
cCs8d}x+|i|ƒ}|pPn|i|ƒq	dS(Ni (RYRX(R]R^tBUFSIZERp((s/usr/lib/python2.6/mimetools.pyR
õs("R<RKtsysRhtwarningsRRt__exit__t	__enter__tpy3kwarningtDeprecationWarningRRt__all__RtthreadtImportErrortdummy_threadt
allocate_lockR=R?RARRERRRt
uudecode_pipeRZR`RfR[R	R
(((s/usr/lib/python2.6/mimetools.pyt<module>sZ
		W		 		

		
	

ACC SHELL 2018