[Twisted-Python] knowing which reactor is running

Manlio Perillo manlio_perillo at libero.it
Mon Oct 23 15:27:03 EDT 2006

L. Daniel Burr ha scritto:
> On Mon, 23 Oct 2006 13:48:18 -0500, Manlio Perillo
> <manlio_perillo at libero.it> wrote:
>> Jean-Paul Calderone ha scritto:
>>> On Sat, 21 Oct 2006 12:11:29 +0200, Manlio Perillo
>>> <manlio_perillo at libero.it> wrote:
>>>> In a test suite I need to know if the win32eventreactor is running.
>>>> Any solution?
>>> You generally shouldn't need this information.  Rather, you should rely
>>> on the interfaces provided by the reactor you're using, and less
>>> commonly
>>> the modules which you are able to import.
>> But the win32eventreactor does not implement a "special" interface like,
>> say, IWin32EventReactor.
> [...]
> Of course it doesn't, because interfaces aren't types.  Having an
> interface named IWin32EventReactor makes no sense, because the
> whole point of interfaces is to describe how something acts, not
> what it is.  Types answer the question "what is this?"; interfaces
> answer the question "what can I do with this?".

IWin32EventReactor interface means that the reactor support the win32
event system (addEvent, removeEvent).

Regards  Manlio Perillo

More information about the Twisted-Python mailing list