web.py on Google App Engine

后端 未结 2 617
粉色の甜心
粉色の甜心 2021-02-06 03:20

I\'m trying to get a web.py application running on GAE. I hoped that sth like the following might work

import web
from google.appengine.ext.webapp.u         


        
相关标签:
2条回答
  • 2021-02-06 03:36

    You don't need to import or use run_wsgi_app, web.py has a runcgi method that works perfectly!

    if __name__  == '__main__':
        app.cgirun()
    
    0 讨论(0)
  • 2021-02-06 03:49

    Here is a snippet of StackPrinter, a webpy application that runs on top of Google App Engine.

    from google.appengine.ext.webapp.util import run_wsgi_app
    import web
    ...
    app = web.application(urls, globals())
    
    def main():
    
        application = app.wsgifunc()
        run_wsgi_app(application)
    
    if __name__ == '__main__':
        main()
    
    0 讨论(0)
提交回复
热议问题