create twistd iro plugin.
from zope.interface import implements
from twisted.python import usage
from twisted.application.service import IServiceMaker
from twisted.plugin import IPlugin
from iro import iro
class Options(usage.Options):
synopsis = "[options]"
longdesc = "Make an iro server."
optParameters = [
['config', 'c', 'iro.conf', 'configuration file.'],
]
class MyServiceMaker(object):
implements(IServiceMaker, IPlugin)
tapname = "iro"
description = "An iro server."
options = Options
def makeService(self, config):
return iro.makeService(config)
serviceMaker = MyServiceMaker()