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.util import run_wsgi_app
[...]
def main():
app = web.application(urls, globals())
run_wsgi_app(app)
But obviously the app
object doesn't conform with the run_wsgi_app
function's expectations. The error msg says sth like app has no __call__ function
, so I tried passing app.run
instead, but that didn't work either.
How can I make the call to run_wsgi_app
work?
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()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With