HelloWorldedit frank, 17 July 2008 (created 06 July 2008)
Now its time to try our first bit of dynamic content. Here is the simplest possible "hello world" application. Note that this is a plain WSGI application - it neither knows no cares that it is running under AppEngine!
Create hello/hello.py:
# straight out of PEP 333 (http://www.python.org/dev/peps/pep-0333/) def simple_app(environ, start_response): "Simplest possible application object" status = '200 OK' response_headers = [('Content-type','text/plain')] start_response(status, response_headers) return ['Hello from CGI Handler!\n']
# does not know nor care that it is running under AppEngine! from wsgiref.handlers import CGIHandler CGIHandler().run(simple_app)