1
# -*- test-case-name: twisted.test.test_app -*-
2
# Copyright (c) 2001-2004 Twisted Matrix Laboratories.
3
# See LICENSE for details.
6
"""Backwards compatability, and utility functions.
8
In general, this module should not be used, other than by reactor authors
9
who need to use the 'installReactor' method.
11
Maintainer: Itamar Shtull-Trauring
16
CONNECTION_DONE = error.ConnectionDone('Connection done')
17
CONNECTION_LOST = error.ConnectionLost('Connection lost')
19
def installReactor(reactor):
20
# this stuff should be common to all reactors.
21
import twisted.internet
23
assert not sys.modules.has_key('twisted.internet.reactor'), \
24
"reactor already installed"
25
twisted.internet.reactor = reactor
26
sys.modules['twisted.internet.reactor'] = reactor
28
__all__ = ["CONNECTION_LOST", "CONNECTION_DONE", "installReactor"]