def setup(self): wsgi_app = None x = sys.stdout # Quixote mangles sys.stdout; save. try: publisher = create_publisher() wsgi_app = quixote.get_wsgi_app() finally: sys.stdout = x # restore. twill.add_wsgi_intercept('localhost', 80, lambda: wsgi_app, '/qx_test')
def setup(self): wsgi_app = None x = sys.stdout # Quixote mangles sys.stdout; save. try: publisher = create_publisher() wsgi_app = quixote.get_wsgi_app() finally: sys.stdout = x # restore. twill.add_wsgi_intercept("localhost", 80, lambda: wsgi_app, "/qx_test")
import quixote, qx_testserver from wsgiref.simple_server import make_server qx_testserver.create_publisher() wsgi_app = quixote.get_wsgi_app() httpd = make_server('', 8000, wsgi_app) httpd.serve_forever()