examples/web/hello_world.py
from __future__ import print_function
from wsgiref.util import setup_testing_defaults
from wsgiref.simple_server import make_server

import time

def hello_world(environ, start_response):
    setup_testing_defaults(environ)

    status = '200 OK'
    headers = [('Content-type', 'text/plain')]

    start_response(status, headers)

    return "Hello World " + str(time.time())

httpd = make_server('', 8000, hello_world)
print("Serving on port 8000...")
httpd.serve_forever()