create twistd iro plugin.
--- a/iro/config.py Fri Aug 10 13:20:42 2012 +0200
+++ b/iro/config.py Fri Aug 10 13:21:26 2012 +0200
@@ -184,7 +184,7 @@
configParser = MyConfigParser()
"""configParser to get configuration."""
-confFiles=["iro.conf", "~/iro.conf","/etc/iro/iro.conf"]
+confFiles=["~/iro.conf","/etc/iro/iro.conf"]
"""Configfile list """
main_options = OrderedDict([
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/twisted/plugins/iro_plugin.py Fri Aug 10 13:21:26 2012 +0200
@@ -0,0 +1,26 @@
+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()