Changeset 24674

Show
Ignore:
Timestamp:
09/02/2008 11:57:09 AM (2 years ago)
Author:
therve
Message:

Revert changes to tap files

Location:
branches/run-plugin-1490-2/twisted
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • branches/run-plugin-1490-2/twisted/conch/tap.py

    r24673 r24674  
    22# See LICENSE for details. 
    33 
     4#  
     5# Twisted, the Framework of Your Internet 
     6# Copyright (c) 2001-2004 Twisted Matrix Laboratories. 
     7# See LICENSE for details. 
     8 
     9 
    410""" 
    5 Support module for making SSH servers with mktap. 
     11I am a support module for making SSH servers with mktap. 
    612""" 
    713 
     
    1117from twisted.python import usage 
    1218from twisted.application import strports 
    13  
    1419 
    1520 
  • branches/run-plugin-1490-2/twisted/mail/tap.py

    r24673 r24674  
    11# -*- test-case-name: twisted.mail.test.test_options -*- 
    2 # Copyright (c) 2001-2008 Twisted Matrix Laboratories. 
     2# Copyright (c) 2001-2004 Twisted Matrix Laboratories. 
    33# See LICENSE for details. 
    44 
    5 """ 
    6 Support module for creating mail servers with 'mktap' 
     5 
     6"""I am the support module for creating mail servers with 'mktap' 
    77""" 
    88 
    99import os 
     10import sys 
    1011 
    1112from twisted.mail import mail 
     
    1920from twisted.cred import checkers 
    2021from twisted.application import internet 
    21  
    2222 
    2323 
  • branches/run-plugin-1490-2/twisted/names/tap.py

    r24673 r24674  
    1 # Copyright (c) 2001-2008 Twisted Matrix Laboratories. 
     1# Copyright (c) 2001-2004 Twisted Matrix Laboratories. 
    22# See LICENSE for details. 
     3 
    34 
    45""" 
     
    1516from twisted.names import authority 
    1617from twisted.names import secondary 
    17  
    18  
    1918 
    2019class Options(usage.Options): 
  • branches/run-plugin-1490-2/twisted/web/tap.py

    r24673 r24674  
    88import os 
    99 
    10 from twisted.web import server, static, twcgi, script, demo, distrib, trp 
    11 from twisted.internet import interfaces 
    12 from twisted.python import usage, reflect 
     10# Twisted Imports 
     11from twisted.web import server, static, twcgi, script, demo, distrib, trp, wsgi 
     12from twisted.internet import interfaces, reactor 
     13from twisted.python import usage, reflect, threadpool 
    1314from twisted.spread import pb 
    1415from twisted.application import internet, service, strports 
    15  
    1616 
    1717 
     
    6262 
    6363    def opt_path(self, path): 
    64         """<path> is either a specific file or a directory to 
    65         be set as the root of the web server. Use this if you 
    66         have a directory full of HTML, cgi, php3, epy, or rpy files or 
    67         any other files that you want to be served up raw. 
     64        """ 
     65        <path> is either a specific file or a directory to be set as the root 
     66        of the web server. Use this if you have a directory full of HTML, cgi, 
     67        php3, epy, or rpy files or any other files that you want to be served 
     68        up raw. 
    6869        """ 
    6970 
     
    105106        """An .rpy file to be used as the root resource of the webserver.""" 
    106107        self['root'] = script.ResourceScriptWrapper(name) 
     108 
     109 
     110    def opt_wsgi(self, name): 
     111        """ 
     112        The FQPN of a WSGI application object to serve as the root resource of 
     113        the webserver. 
     114        """ 
     115        pool = threadpool.ThreadPool() 
     116        reactor.callWhenRunning(pool.start) 
     117        reactor.addSystemEventTrigger('after', 'shutdown', pool.stop) 
     118        try: 
     119            application = reflect.namedAny(name) 
     120        except (AttributeError, ValueError): 
     121            raise usage.UsageError("No such WSGI application: %r" % (name,)) 
     122        self['root'] = wsgi.WSGIResource(reactor, pool, application) 
    107123 
    108124