[Twisted-Python] Problems using win32eventreactor()

Jeff Grimmett grimmtooth at softhome.net
Mon Feb 10 21:01:42 EST 2003


I'm having a problem using the win32eventreactor, following the example
code. Here's the basic gist of the code in use:

from	twisted.internet.protocol	import	Factory
from	twisted.internet		import	reactor
from	twisted.internet		import	win32eventreactor
from	twisted.protocols.basic	import	LineReceiver

:: classes and stuff ::


factory = myFactory()

This generates an error message at the win32eventreactor.install() line:

    assert not sys.modules.has_key('twisted.internet.reactor'), \
AssertionError: reactor already installed

What am I missing?

Also, any ideas why SIGBREAK appears to be ignored?  I've tweaked the
source here and there to generate debugging info, and from what I can
see, the reactor isn't even hitting the SIGBREAK handler that is
installed with signal.signal()
(default.PosixReactorBase._handleSignals()).  I've worked around it
temporarilly by commenting out the SIGBREAK handler install, but I'm
sure there's a better solution :-)

Win2000sp3, Python 2.2, Twisted 1.0.2, FWIW.

More information about the Twisted-Python mailing list