[Twisted-Python] Choosing /reactors

Christopher Armstrong radeex at gmail.com
Sun Mar 13 03:43:13 EST 2005


On Sun, 13 Mar 2005 14:40:42 +0800, Sinang, Danny <D.Sinang at spitech.com> wrote:
>  
> Hello, 
>   
> I installed Twisted on a Mandrake Linux box and ran some test code before
> reading on the Twisted website that the first thing I must do is install my
> preferred "reactor". 
>   
> So I assume my running my test code installed the default "reactor", which
> is for select(). 
>   
> I've subsequently installed the poll() reactor, but am unsure how to make
> Twisted use it or make it its default reactor(). 
>   
> Can anybody on this list help me ? 
>   
> Also, is there a way to uninstall a reactor ? 

It's not so much "install" as "use". To specify a reactor to use with
twistd, for example, pass the --reactor argument. If you're not using
twistd, then make sure you "from twisted.internet import yourreactor;
yourreactor.install()" before anything imports
twisted.internet.reactor.

http://twistedmatrix.com/projects/core/documentation/howto/choosing-reactor.html
for more information.


-- 
  Twisted   |  Christopher Armstrong: International Man of Twistery
   Radix    |    -- http://radix.twistedmatrix.com
            |  Release Manager, Twisted Project
  \\\V///   |    -- http://twistedmatrix.com
   |o O|    |  Founding Member, Hobart Hacking Society
w----v----w-+    -- http://hackingsociety.org/chapters/hash




More information about the Twisted-Python mailing list