[Twisted-Python] Multiple Twisted Application Plugins in the same directory?

Christopher Armstrong radix at twistedmatrix.com
Wed Sep 12 18:15:53 MDT 2007


On 9/12/07, Beau Hargis <beau at subobscur.us> wrote:
> For one of the services I want to use pollreactor or epollreactor, so each of the Services has only 4 lines in it:
>
> from twisted.internet import pollreactor
> pollreactor.install()
> import Project.Processors.ProcessorX
> theService = Project.Processors.ProcessorX.ProcXServiceMaker()

Don't install a reactor in the plugin: in fact, don't import the
reactor at all. The correct way to choose the reactor is by passing
the "-r" or "--reactor" argument to 'twistd', like 'twistd -r poll
myplugin'

-- 
Christopher Armstrong
International Man of Twistery
http://radix.twistedmatrix.com/
http://twistedmatrix.com/
http://canonical.com/




More information about the Twisted-Python mailing list