Advertisement
rfmonk

py27webapp_helloworld.py

Aug 31st, 2014
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.33 KB | None | 0 0
  1. # different from the 2.5 version
  2. # this is now done idiomatically
  3. # using Python 2.7
  4.  
  5. import webapp2
  6.  
  7. class MainPage(webapp2.RequestHandler):
  8.     def get(self):
  9.         self.response.headers['Content-Type'] = 'text/plain'
  10.         self.response.out.write('Hello world')
  11.  
  12. app = webapp2.WSGIApplication([('/.*', MainPage)],
  13.         debug=True)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement