Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def main():
logging.getLogger().setLevel(logging.DEBUG)
application = webapp.WSGIApplication([('/gtfs/port/stops', PortStopsHandler),
('/gtfs/port/stop/task/', PortStopTask),
],
debug=True)
wsgiref.handlers.CGIHandler().run(application)
def main():
application = webapp.WSGIApplication([
('/', MainHandler),
('/georss', GeoRSSHandler),
('/geojson', GeoJSONHandler),
('/kml', GeoKMLHandler),
], debug=True)
wsgiref.handlers.CGIHandler().run(application)
def cgirun(self, *middleware):
"""
Return a CGI handler. This is mostly useful with Google App Engine.
There you can just do:
main = app.cgirun()
"""
wsgiapp = self.wsgifunc(*middleware)
try:
from google.appengine.ext.webapp.util import run_wsgi_app
return run_wsgi_app(wsgiapp)
except ImportError:
# we're not running from within Google App Engine
return wsgiref.handlers.CGIHandler().run(wsgiapp)
def main():
application = webapp.WSGIApplication([
('/admin/upgrade', UpgradeHandler),
('/admin/setup', SetupHandler),
])
wsgiref.handlers.CGIHandler().run(application)
def main():
application = webapp.WSGIApplication([
('/', RootHandler),
('/new', NewHandler),
('/.*', ScriptHandler),
], debug=True)
wsgiref.handlers.CGIHandler().run(application)
def main():
wsgiref.handlers.CGIHandler().run(application)
def _StubWSGIUtils(output_app_holder):
"""Stub out WSGI adapters for python 2.5."""
stubs = _StubOut()
stubbed_wsgi_handler_class = (
lambda * args, **kwargs: _MockedWsgiHandler(output_app_holder))
def RunWSGIStub(application):
output_app_holder.append(application)
stubs.Set(webapp_util, 'run_bare_wsgi_app', RunWSGIStub)
stubs.Set(webapp_util, 'run_wsgi_app', RunWSGIStub)
stubs.Set(handlers, 'BaseHandler', stubbed_wsgi_handler_class)
stubs.Set(handlers, 'SimpleHandler', stubbed_wsgi_handler_class)
stubs.Set(handlers, 'BaseCGIHandler', stubbed_wsgi_handler_class)
stubs.Set(handlers, 'CGIHandler', stubbed_wsgi_handler_class)
return stubs.CleanUp
def main():
wsgiref.handlers.CGIHandler().run(_application)