config root man

Current Path : /usr/local/lib/python2.5/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //usr/local/lib/python2.5/asynchat.pyc

³ņ
h”Rc@szdZddkZddkZddklZdeifd„ƒYZddd„ƒYZddd	„ƒYZd
„Z	dS(
s„A 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.
i’’’’N(tdequet
async_chatcBs­eZdZdZdZdd„Zd„Zd„Zd„Z	d„Z
d„Zd„Zd	„Z
d
„Zd„Zd„Zd
„Zd„Zd„Zd„Zd„ZRS(s‡This is an abstract class.  You must derive from this class, and add
    the two methods collect_incoming_data() and found_terminator()icCs5d|_d|_tƒ|_tii||ƒdS(Nt(tac_in_buffert
ac_out_buffertfifot
producer_fifotasyncoret
dispatchert__init__(tselftconn((s$/usr/local/lib/python2.5/asynchat.pyR	>s		cCs
td‚dS(Nsmust be implemented in subclass(tNotImplementedError(R
tdata((s$/usr/local/lib/python2.5/asynchat.pytcollect_incoming_dataDscCs
td‚dS(Nsmust be implemented in subclass(R(R
((s$/usr/local/lib/python2.5/asynchat.pytfound_terminatorGscCs
||_dS(sRSet the input delimiter.  Can be a fixed string of any length, an integer, or NoneN(t
terminator(R
tterm((s$/usr/local/lib/python2.5/asynchat.pytset_terminatorJscCs|iS(N(R(R
((s$/usr/local/lib/python2.5/asynchat.pytget_terminatorNscCsy|i|iƒ}Wn&tij
o}|iƒdSnX|i||_xÉ|io¾t|iƒ}|iƒ}|p|i|iƒd|_qRt	|t
ƒpt	|tƒo{|}||jo-|i|iƒd|_|i||_q|i|i| ƒ|i||_d|_|i
ƒqRt|ƒ}|ii|ƒ}|djoG|djo|i|i| ƒn|i|||_|i
ƒqRt|i|ƒ}|o<||jo*|i|i| ƒ|i||_nPqR|i|iƒd|_qRWdS(NRii’’’’(trecvtac_in_buffer_sizetsocketterrorthandle_errorRtlenRRt
isinstancetinttlongRRtfindtfind_prefix_at_end(R
R
twhytlbRtntterminator_lentindex((s$/usr/local/lib/python2.5/asynchat.pythandle_readVsL
	

 
			


cCs|iƒdS(N(t
initiate_send(R
((s$/usr/local/lib/python2.5/asynchat.pythandle_write˜scCs|iƒdS(N(tclose(R
((s$/usr/local/lib/python2.5/asynchat.pythandle_close›scCs$|iit|ƒƒ|iƒdS(N(Rtpushtsimple_producerR%(R
R
((s$/usr/local/lib/python2.5/asynchat.pyR)žscCs|ii|ƒ|iƒdS(N(RR)R%(R
tproducer((s$/usr/local/lib/python2.5/asynchat.pytpush_with_producer¢scCst|iƒ|ijS(s4predicate for inclusion in the readable for select()(RRR(R
((s$/usr/local/lib/python2.5/asynchat.pytreadable¦scCs(|idjo|iiƒo|iS(s4predicate for inclusion in the writable for select()R(RRtis_emptyt	connected(R
((s$/usr/local/lib/python2.5/asynchat.pytwritableŖscCs|iidƒdS(sAautomatically close this channel once the outgoing queue is emptyN(RR)tNone(R
((s$/usr/local/lib/python2.5/asynchat.pytclose_when_done“scCsŲxŃt|iƒoŗ|iiƒ}|djo-|ip|iiƒ|iƒndSn6t|tƒo%|iiƒ|i||_dSn|i	ƒ}|o|i||_dSqŃ|iiƒqdSqdS(N(
RRtfirstR1RtpopR'Rtstrtmore(R
tpR
((s$/usr/local/lib/python2.5/asynchat.pyt
refill_bufferŗs$



cCs§|i}t|iƒ|jo|iƒn|iol|ioby5|i|i| ƒ}|o|i||_nWq£tij
o}|iƒdSq£XndS(N(	tac_out_buffer_sizeRRR8R/tsendRRR(R
tobstnum_sentR((s$/usr/local/lib/python2.5/asynchat.pyR%Ņs	
cCs5d|_d|_x|io|iiƒqWdS(NR(RRRR4(R
((s$/usr/local/lib/python2.5/asynchat.pytdiscard_buffersćs
		
N(t__name__t
__module__t__doc__RR9R1R	RRRRR$R&R(R)R,R-R0R2R8R%R=(((s$/usr/local/lib/python2.5/asynchat.pyR5s&					B						
			R*cBseZdd„Zd„ZRS(icCs||_||_dS(N(R
tbuffer_size(R
R
RA((s$/usr/local/lib/python2.5/asynchat.pyR	ķs	cCs^t|iƒ|ijo+|i|i }|i|i|_|Sn|i}d|_|SdS(NR(RR
RA(R
tresult((s$/usr/local/lib/python2.5/asynchat.pyR6ńs		(R>R?R	R6(((s$/usr/local/lib/python2.5/asynchat.pyR*ėsRcBsAeZdd„Zd„Zd„Zd„Zd„Zd„ZRS(cCs*|ptƒ|_nt|ƒ|_dS(N(Rtlist(R
RC((s$/usr/local/lib/python2.5/asynchat.pyR	üscCs
t|iƒS(N(RRC(R
((s$/usr/local/lib/python2.5/asynchat.pyt__len__scCs|iS(N(RC(R
((s$/usr/local/lib/python2.5/asynchat.pyR.scCs|idS(Ni(RC(R
((s$/usr/local/lib/python2.5/asynchat.pyR3scCs|ii|ƒdS(N(RCtappend(R
R
((s$/usr/local/lib/python2.5/asynchat.pyR)scCs)|iod|iiƒfSndSdS(Nii(iN(RCtpopleftR1(R
((s$/usr/local/lib/python2.5/asynchat.pyR4s
N(	R>R?R1R	RDR.R3R)R4(((s$/usr/local/lib/python2.5/asynchat.pyRūs				cCsBt|ƒd}x+|o#|i|| ƒo|d8}qW|S(Ni(Rtendswith(thaystacktneedletl((s$/usr/local/lib/python2.5/asynchat.pyR#s
(((
R@RRtcollectionsRRRR*RR(((s$/usr/local/lib/python2.5/asynchat.pys<module>/s¶(

Man Man