webappフレームワーク | google app engine
http://code.google.com/intl/ja/appengine/docs/python/gettingstarted/usingwebapp.html
Djangoとかも使えるようですがとりあえずwebappで例のとおり
helloworld.pyを書き換えます。
from google.appengine.ext import webapp from google.appengine.ext.webapp.util import run_wsgi_app class MainPage(webapp.RequestHandler): def get(self): self.response.headers['Content-Type'] = 'text/plain' self.response.out.write('Hello, webapp bbtune World!') application = webapp.WSGIApplication( [('/', MainPage)], debug=True) def main(): run_wsgi_app(application) if __name__ == "__main__": main()
http://localhost:8080/
で表示されました。