Hi Jason, Either approach works. The former is slightly more efficient, since it only creates the WSGI application once, and reuses it for each request.
-Nick Johnson On Fri, Jul 10, 2009 at 2:20 AM, ja...@kuam.com<digitalpontificat...@gmail.com> wrote: > > Hello! I'm new to App Engine and I've gone through the 'Hello World' > tutorial and am looking through the demo code in the SDK. Should I be > importing/using this statement (from the online tutorial): > > from google.appengine.ext.webapp.util import run_wsgi_app > # ....more code... > > application = webapp.WSGIApplication([('/',MainPage),('/ > sign',Guestbook)],debug=True) > > def main(): > run_wsgi_app(application) > > ...which obviously instantiates a WSGIApplication object outside of > the main() method, or this code (from the SDK sample): > > import wsgiref.handlers > # ...more code... > > def main(): > application = webapp.WSGIApplication([('/', > MainHandler)],debug=True) > wsgiref.handlers.CGIHandler().run(application) > > I'm assuming the former, being cleaner and more neatly-packaged. > Thanks for your help! > > > > -- Nick Johnson, App Engine Developer Programs Engineer Google Ireland Ltd. :: Registered in Dublin, Ireland, Registration Number: 368047 --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google App Engine" group. To post to this group, send email to google-appengine@googlegroups.com To unsubscribe from this group, send email to google-appengine+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-appengine?hl=en -~----------~----~----~----~------~----~------~--~---