root / trunk / twisted / internet / main.py

Revision 24441, 0.8 kB (checked in by thijs, 1 year ago)

Merge maintainer-email-2438: Get rid of references to maintainer email addresses from code.

Author: thijs
Reviewer: exarkun
Fixes: #2438

Line 
1 # -*- test-case-name: twisted.test.test_app -*-
2 # Copyright (c) 2001-2004 Twisted Matrix Laboratories.
3 # See LICENSE for details.
4
5
6 """Backwards compatability, and utility functions.
7
8 In general, this module should not be used, other than by reactor authors
9 who need to use the 'installReactor' method.
10
11 Maintainer: Itamar Shtull-Trauring
12 """
13
14 import error
15
16 CONNECTION_DONE = error.ConnectionDone('Connection done')
17 CONNECTION_LOST = error.ConnectionLost('Connection lost')
18
19 def installReactor(reactor):
20     # this stuff should be common to all reactors.
21     import twisted.internet
22     import sys
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
27
28 __all__ = ["CONNECTION_LOST", "CONNECTION_DONE", "installReactor"]
Note: See TracBrowser for help on using the browser.