Your IP : 172.28.240.42


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

ó
[³XMc@sdZddlZddlmZddlmZddlmZmZddl	m
Z
mZdejfd„ƒYZ
ed	krýe
jejd
ƒjƒejeejddƒƒdd
lmZe
ƒZejeƒejƒejejƒndS(sÏ
Main program for the child process run by
L{twisted.test.test_stdio.StandardInputOutputTestCase.test_readConnectionLost}
to test that IHalfCloseableProtocol.readConnectionLost works for process
transports.
iÿÿÿÿN(t
implements(tIHalfCloseableProtocol(tstdiotprotocol(treflecttlogtHalfCloseProtocolcBs9eZdZeeƒdZd„Zd„Zd„Z	RS(sÎ
    A protocol to hook up to stdio and observe its transport being
    half-closed.  If all goes as expected, C{exitCode} will be set to C{0};
    otherwise it will be set to C{1} to indicate failure.
    cCs|jjdƒdS(s=
        Signal the parent process that we're ready.
        txN(t	transporttwrite(tself((sE/usr/lib/python2.7/dist-packages/twisted/test/stdio_test_halfclose.pytconnectionMadescCsd|_tjƒdS(sv
        This is the desired event.  Once it has happened, stop the reactor so
        the process will exit.
        iN(texitCodetreactortstop(R
((sE/usr/lib/python2.7/dist-packages/twisted/test/stdio_test_halfclose.pytreadConnectionLost&s	cCs9|jdkr+d|_tj|dƒntjƒdS(sŒ
        This may only be invoked after C{readConnectionLost}.  If it happens
        otherwise, mark it as an error and shut down.
        is!Unexpected call to connectionLostN(RtNoneRterrR
R(R
treason((sE/usr/lib/python2.7/dist-packages/twisted/test/stdio_test_halfclose.pytconnectionLost/s	N(
t__name__t
__module__t__doc__RRRRRRR(((sE/usr/lib/python2.7/dist-packages/twisted/test/stdio_test_halfclose.pyRs
			t__main__iitw(R
(Rtsystzope.interfaceRttwisted.internet.interfacesRttwisted.internetRRttwisted.pythonRRtProtocolRRtnamedAnytargvtinstalltstartLoggingtfileR
t
StandardIOtruntexitR(((sE/usr/lib/python2.7/dist-packages/twisted/test/stdio_test_halfclose.pyt<module>
s&