[Twisted-Python] How to hook at StandardIO factory to a twistd app

akrherz at iastate.edu akrherz at iastate.edu
Wed Apr 8 12:14:33 EDT 2009

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

# then by .tac has
application = service.Application("Ingestor")
serviceCollection = service.IServiceCollection(application)

proto = MyProtocol()
factory = MyFactory( proto )

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 .

Sorry for what I suspect is an embarrassingly simple question. :(

thank you!

More information about the Twisted-Python mailing list