Re: asyncio.reactor.install()

Jean-Paul Calderone <[email protected]> Tue, 18 Dec 2018 20:18:52 -0500
Newsgroups gmane.comp.python.twisted
Message-ID <CAEeXt4Pqft0RU_n-sS7VwLg=trVa-q15zty+qWe0BQpceGuS1Q@mail.gmail.com>
On Tue, Dec 18, 2018 at 7:43 PM Jeff Grimmett <[email protected]> wrote:

> This pattern works:
>
>
>
> *from twisted.internet import wxreactorreactor = wxreactor.install()*
>

The fact that a reactor is returned by install is a bit of a mistake and is
not really part of the interface of *install.*

For whatever reason, asyncioreactor.install doesn't bother to return the
reactor it creates.

You should do this instead:

from twisted.internet import wxreactor

wxreactor.install()

from twisted.internet import reactor


Or don't do reactor installation yourself at all, use twistd or twist or
some other similar tool.

Jean-Paul

_______________________________________________
Twisted-Python mailing list
[email protected]
https://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python