MCPcopy Create free account
hub / github.com/webpy/webpy / cgirun

Method cgirun

web/application.py:364–379  ·  view source on GitHub ↗

Return a CGI handler. This is mostly useful with Google App Engine. There you can just do: main = app.cgirun()

(self, *middleware)

Source from the content-addressed store, hash-verified

362 httpserver.server = None
363
364 def cgirun(self, *middleware):
365 """
366 Return a CGI handler. This is mostly useful with Google App Engine.
367 There you can just do:
368
369 main = app.cgirun()
370 """
371 wsgiapp = self.wsgifunc(*middleware)
372
373 try:
374 from google.appengine.ext.webapp.util import run_wsgi_app
375
376 return run_wsgi_app(wsgiapp)
377 except ImportError:
378 # we're not running from within Google App Engine
379 return wsgiref.handlers.CGIHandler().run(wsgiapp)
380
381 def gaerun(self, *middleware):
382 """

Callers

nothing calls this directly

Calls 2

wsgifuncMethod · 0.95
runMethod · 0.45

Tested by

no test coverage detected