Your IP : 172.28.240.42


Current Path : /usr/lib/python2.7/dist-packages/twisted/internet/
Upload File :
Current File : //usr/lib/python2.7/dist-packages/twisted/internet/_win32stdio.pyc

ó
ך	Kc@sÅdZddlZddlZddlZddlmZddlmZmZm	Z	ddlm
Z
mZddlm
Z
mZddlmZdefd	„ƒYZd
e
jfd„ƒYZdS(sM
Windows-specific implementation of the L{twisted.internet.stdio} interface.
iÿÿÿÿN(t
implements(tIHalfCloseableProtocolt
ITransporttIAddress(t	IConsumert
IPushProducer(t_pollingfiletmain(tFailuretWin32PipeAddresscBseZeeƒRS((t__name__t
__module__RR(((s@/usr/lib/python2.7/dist-packages/twisted/internet/_win32stdio.pyR	st
StandardIOcBs±eZeeeeƒeZeZd„Z	d„Z
d„Zd„ZdZ
d„Zd„Zd„Zd„Zd	„Zd
„Zd„Zd„Zd
„Zd„Zd„ZRS(cCsêddlm}x-tdddƒD]}tj|tjƒq#Wtjj	||ƒ||_
tjtj
ƒ}tjtjƒ}tj||j|jƒ|_tj||jƒ|_|j|jƒ|j|jƒ|j
j|ƒdS(sƒ
        Start talking to standard IO with the given protocol.

        Also, put it stdin/stdout/stderr into binary mode.
        iÿÿÿÿ(treactoriiiN(ttwisted.internetR
trangetmsvcrttsetmodetostO_BINARYRt
_PollingTimert__init__tprototwin32apitGetStdHandletSTD_INPUT_HANDLEtSTD_OUTPUT_HANDLEt_PollableReadPipetdataReceivedtreadConnectionLosttstdint_PollableWritePipetwriteConnectionLosttstdoutt_addPollableResourcetmakeConnection(tselfRR
tstdfdthstdinthstdout((s@/usr/lib/python2.7/dist-packages/twisted/internet/_win32stdio.pyR!s	cCs|jj|ƒdS(N(RR(R$tdata((s@/usr/lib/python2.7/dist-packages/twisted/internet/_win32stdio.pyR=scCs0tj|jƒr"|jjƒn|jƒdS(N(Rt
providedByRRt
checkConnLost(R$((s@/usr/lib/python2.7/dist-packages/twisted/internet/_win32stdio.pyR@scCs0tj|jƒr"|jjƒn|jƒdS(N(RR)RR R*(R$((s@/usr/lib/python2.7/dist-packages/twisted/internet/_win32stdio.pyR EsicCsP|jd7_|jdkrLt|_t|_|jjttjƒƒndS(Nii(	t	connsLosttTruet
disconnectingtdisconnectedRtconnectionLostRRtCONNECTION_DONE(R$((s@/usr/lib/python2.7/dist-packages/twisted/internet/_win32stdio.pyR*Ls
		cCs|jj|ƒdS(N(R!twrite(R$R(((s@/usr/lib/python2.7/dist-packages/twisted/internet/_win32stdio.pyR1UscCs|jjdj|ƒƒdS(Nt(R!R1tjoin(R$tseq((s@/usr/lib/python2.7/dist-packages/twisted/internet/_win32stdio.pyt
writeSequenceXscCs't|_|jjƒ|jjƒdS(N(R,R-RtcloseR!(R$((s@/usr/lib/python2.7/dist-packages/twisted/internet/_win32stdio.pytloseConnection[s	
cCstƒS(N(R	(R$((s@/usr/lib/python2.7/dist-packages/twisted/internet/_win32stdio.pytgetPeer`scCstƒS(N(R	(R$((s@/usr/lib/python2.7/dist-packages/twisted/internet/_win32stdio.pytgetHostcscCs|jj||ƒS(N(R!tregisterProducer(R$tproducert	streaming((s@/usr/lib/python2.7/dist-packages/twisted/internet/_win32stdio.pyR:hscCs
|jjƒS(N(R!tunregisterProducer(R$((s@/usr/lib/python2.7/dist-packages/twisted/internet/_win32stdio.pyR=kscCs|jjƒdS(N(Rt
stopProducing(R$((s@/usr/lib/python2.7/dist-packages/twisted/internet/_win32stdio.pyR>rscCs|jjƒdS(N(RtpauseProducing(R$((s@/usr/lib/python2.7/dist-packages/twisted/internet/_win32stdio.pyR?wscCs|jjƒdS(N(RtresumeProducing(R$((s@/usr/lib/python2.7/dist-packages/twisted/internet/_win32stdio.pyR@zs(R
RRRRRtFalseR-R.RRRR R+R*R1R5R7R8R9R:R=R>R?R@(((s@/usr/lib/python2.7/dist-packages/twisted/internet/_win32stdio.pyRs*															(t__doc__RRRtzope.interfaceRttwisted.internet.interfacesRRRRRRRRttwisted.python.failureRtobjectR	RR(((s@/usr/lib/python2.7/dist-packages/twisted/internet/_win32stdio.pyt<module>s