
Jan. 22, 2008
8:37 p.m.
Grepping the Twisted code suggests this is a "problem" that is not really worth trying to fix fully. It's probably best to just avoid the problem by making sure you get to install your choice of reactor before anything else.
When I ran into this issue and asked, that is what I was told. i.e. in real terms this means: #!/usr/bin/python # DO THIS BEFORE *ANYTHING* ELSE!!! from twisted.internet import glib2reactor glib2reactor.install() # only then start importing things from twisted.internet import defer from twisted.python import utils # ...etc
Of course, if you use the twistd daemon installing a specific reactor at the correct time is easy, by using the --reactor flag.