~soren/nova/iptables-security-groups

« back to all changes in this revision

Viewing changes to vendor/Twisted-10.0.0/twisted/scripts/twistd.py

  • Committer: Jesse Andrews
  • Date: 2010-05-28 06:05:26 UTC
  • Revision ID: git-v1:bf6e6e718cdc7488e2da87b21e258ccc065fe499
initial commit

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# -*- test-case-name: twisted.test.test_twistd -*-
 
2
# Copyright (c) 2001-2008 Twisted Matrix Laboratories.
 
3
# See LICENSE for details.
 
4
 
 
5
"""
 
6
The Twisted Daemon: platform-independent interface.
 
7
 
 
8
@author: Christopher Armstrong
 
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']