1
# -*- test-case-name: twisted.test.test_stdio.StandardInputOutputTestCase.test_writeSequence -*-
2
# Copyright (c) 2006-2007 Twisted Matrix Laboratories.
3
# See LICENSE for details.
6
Main program for the child process run by
7
L{twisted.test.test_stdio.StandardInputOutputTestCase.test_writeSequence} to test that
8
ITransport.writeSequence() works for process transports.
13
from twisted.internet import stdio, protocol
14
from twisted.python import reflect
16
class WriteSequenceChild(protocol.Protocol):
17
def connectionMade(self):
18
self.transport.writeSequence(list('ok!'))
19
self.transport.loseConnection()
22
def connectionLost(self, reason):
26
if __name__ == '__main__':
27
reflect.namedAny(sys.argv[1]).install()
28
from twisted.internet import reactor
29
stdio.StandardIO(WriteSequenceChild())