How to use the wsgiref.handlers.CGIHandler function in wsgiref

To help you get started, we’ve selected a few wsgiref examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github baz / app-sales-machine / main.py View on Github external
def main():
	application = webapp.WSGIApplication([('/', admin.RootHandler),
											('/admin', admin.RootHandler),
											('/admin/upload', admin.UploadHandler),
                                            ('/admin/chart', admin.ChartHandler),
									  		], debug=True)
	wsgiref.handlers.CGIHandler().run(application)
github perkeep / perkeep / server / gae-py-blobserver / main.py View on Github external
def main():
  wsgiref.handlers.CGIHandler().run(APP)
github timburks / openradar / python / main.py View on Github external
('/hello',			openradar.web.Hello),
    ('/loginurl',		openradar.web.Login),
    ('/myradars',		openradar.web.RadarList),
    ('/myradars/add',		openradar.web.RadarAdd),
    ('/myradars/edit',		openradar.web.RadarEdit),
    ('/myradars/delete',	openradar.web.RadarDelete),
    ('/page/[0-9]+',		openradar.web.RadarListByPage),
    ('/radar',			openradar.web.RadarViewByIdOrNumber),
    ('/radarsby',		openradar.web.RadarsByUser),
    ('/rdar',			openradar.web.RadarViewByIdOrNumber),
    ('/refresh',		openradar.web.Refresh),
    #DISABLED ('/reput',	openradar.web.RePut),
    ('/search',			openradar.web.Search),
    ('.*',			openradar.web.NotFound)
  ], debug=True)
  wsgiref.handlers.CGIHandler().run(application)
github nortd / driveboardapp / backend / bottle.py View on Github external
def run(self, handler): # pragma: no cover
        from wsgiref.handlers import CGIHandler
        CGIHandler().run(handler) # Just ignore host and port here
github AppScale / appscale / AppServer / lib / webapp2 / webapp2.py View on Github external
This uses functions provided by ``google.appengine.ext.webapp.util``,
        if available: ``run_bare_wsgi_app`` and ``run_wsgi_app``.

        Otherwise, it uses ``wsgiref.handlers.CGIHandler().run()``.

        :param bare:
            If True, doesn't add registered WSGI middleware: use
            ``run_bare_wsgi_app`` instead of ``run_wsgi_app``.
        """
        if _webapp_util:
            if bare:
                _webapp_util.run_bare_wsgi_app(self)
            else:
                _webapp_util.run_wsgi_app(self)
        else: # pragma: no cover
            handlers.CGIHandler().run(self)
github Dan-in-CA / SIP / web / application.py View on Github external
)

            # if 2.7, return a function that can be run by gae
            if minor == 7:
                return wsgiapp
            # if 2.5, use run_wsgi_app
            elif minor == 5:
                from google.appengine.ext.webapp.util import run_wsgi_app

                return run_wsgi_app(wsgiapp)
            else:
                raise EnvironmentError(
                    "Not a supported platform, use python 2.5 or 2.7"
                )
        except ImportError:
            return wsgiref.handlers.CGIHandler().run(wsgiapp)
github Khan / frankenserver / python / google / appengine / tools / dev_appserver_info.py View on Github external
def main():
  application = webapp.WSGIApplication(URL_MAP.items())
  wsgiref.handlers.CGIHandler().run(application)
github PaulKinlan / Amplifriend / main.py View on Github external
# Queue Handlers
		('/queue/email/createfriendship', queue.email.CreateFriendshipEmailHandler),
		('/queue/email/createuser', queue.email.CreateUserEmailHandler),
		
		# TODO: Amplifeeder handlers go here. refactor later.
		(r'/([^/]+)/AssetCombiner\.ashx', users.amplifeeder.AssetCombinerHandler),
		(r'/([^/]+)/Themes/(.+)', users.amplifeeder.ThemeHandler),
		(r'/([^/]+)/UIService\.asmx/(.+?)', users.amplifeeder.UIServiceHandler)
	]
	
	application = webapp.WSGIApplication(
			handlers,
            debug = True)
	
	wsgiref.handlers.CGIHandler().run(application)
github rosskarchner / eventgrinder / museum / distlib / tipfy / __init__.py View on Github external
app = Tipfy(rules=[
                Rule('/', endpoint='home', handler=HelloWorldHandler),
            ])

            def main():
                app.run()

            if __name__ == '__main__':
                main()
        """
        # Fix issue #772.
        if self.dev:
            fix_sys_path()

        CGIHandler().run(self)
github garethr / appengine-books / web / main.py View on Github external
def main():
    "Run the application"
    wsgiref.handlers.CGIHandler().run(application())