from webob import Request, Response # **** Routine (class) that handles the request **** class WebApp(object): def __call__(self, environ, start_response): # capture the request from the browser req = Request(environ) print("**** Serving request ****") # create the HTML string for the response html = """

My First Heading

My first paragraph.

""" # return the response resp = Response(html) return resp(environ, start_response) application = WebApp() if __name__ == '__main__': from wsgiref.simple_server import make_server port = 8080 httpd = make_server('', port, application) print('Serving HTTP on port %s...'%port) httpd.serve_forever()