[Twisted-Python] threadedselectreactor

Shawn Church Sl_Church at sbcglobal.net
Fri May 27 15:35:00 EDT 2005



Michele Petrazzo wrote:

> I had downloaded this file, but I not didn't find any documentation for
> use it. I try a threadedselectreactor.install(), but twisted say me that
> there is another reactror installed.

Read the examples Bob referenced.  The examples are one reason why I
co'd the entire trunk.  Another reason is so if I need a specific fix
for any part of twisted I can just update my working copy and copy the
file(s) as needed.

For this specific problem you should check the ORDER of your import
statements.  They should be:

    from twisted.internet import threadedselectreactor
    threadedselectreactor.install()
    from twisted.internet import reactor

After your main module imports the above, subsequent modules should just
use "from twisted.internet import reactor"
if they need to call any reactor methods.  I could be wrong about this
but it seems to work for me.

Good luck :)


Shawn Church
http://SChurchComputers.com





More information about the Twisted-Python mailing list