def opt_wsgi(self, name):
        """
        The FQPN of a WSGI application object to serve as the root resource of
        the webserver.
        """
        pool = threadpool.ThreadPool()
        reactor.callWhenRunning(pool.start)
        reactor.addSystemEventTrigger('after', 'shutdown', pool.stop)
        try:
            application = reflect.namedAny(name)
        except (AttributeError, ValueError):
            raise usage.UsageError("No such WSGI application: %r" % (name,))
        self['root'] = wsgi.WSGIResource(reactor, pool, application)
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/web/tap.py/Options.opt_wsgi/original