> Hi Twisted! > > Could a kind soul provide me an example of how to connect my StandardIO > factory to a twistd app? Here is an overview of my code > > class MyProtocol(basic.LineReceiver): > # Blah Blah > > class MyFactory( stdio.StandardIO ): > def __init__(self, protocol): > self.protocol = protocol
You should not subclass StandardIO, nor do you need a factory. You just do "stdio = StandardIO(protocolInstance)" and then keep that reference around. > It is not clear to me how to connect my factory to the application, I do > this many other times for network related factories by connecting via a > TCPServer or TCPClient . Write a custom service, with a startService that creates a StandardIO instance and shuts it down in stopService. _______________________________________________ Twisted-Python mailing list Twisted-Python@twistedmatrix.com http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python