equal
deleted
inserted
replaced
|
1 from zope.interface import implements |
|
2 |
|
3 from twisted.python import usage |
|
4 from twisted.application.service import IServiceMaker |
|
5 from twisted.plugin import IPlugin |
|
6 |
|
7 from iro import iro |
|
8 |
|
9 class Options(usage.Options): |
|
10 synopsis = "[options]" |
|
11 longdesc = "Make an iro server." |
|
12 optParameters = [ |
|
13 ['config', 'c', 'iro.conf', 'configuration file.'], |
|
14 ] |
|
15 |
|
16 class MyServiceMaker(object): |
|
17 implements(IServiceMaker, IPlugin) |
|
18 |
|
19 tapname = "iro" |
|
20 description = "An iro server." |
|
21 options = Options |
|
22 |
|
23 def makeService(self, config): |
|
24 return iro.makeService(config) |
|
25 |
|
26 serviceMaker = MyServiceMaker() |