~landscape/zope3/newer-from-ztk

« back to all changes in this revision

Viewing changes to src/twisted/scripts/twistd.py

  • Committer: Thomas Hervé
  • Date: 2009-07-08 13:52:04 UTC
  • Revision ID: thomas@canonical.com-20090708135204-df5eesrthifpylf8
Remove twisted copy

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
"""
2
 
The Twisted Daemon: platform-independent interface.
3
 
 
4
 
Stability: Unstable. Please contact the maintainer if you need any
5
 
improvements.
6
 
 
7
 
@author: U{Christopher Armstrong<mailto:radix@twistedmatrix.com>}
8
 
"""
9
 
 
10
 
 
11
 
from twisted.application import app
12
 
 
13
 
from twisted.python.runtime import platformType
14
 
if platformType == "win32":
15
 
    from twisted.scripts._twistw import ServerOptions, \
16
 
        WindowsApplicationRunner as _SomeApplicationRunner
17
 
else:
18
 
    from twisted.scripts._twistd_unix import ServerOptions, \
19
 
        UnixApplicationRunner as _SomeApplicationRunner
20
 
 
21
 
 
22
 
def runApp(config):
23
 
    _SomeApplicationRunner(config).run()
24
 
 
25
 
 
26
 
def run():
27
 
    app.run(runApp, ServerOptions)
28
 
 
29
 
 
30
 
__all__ = ['run', 'runApp']