# HG changeset patch # User Simon Cross # Date 1316194173 -7200 # Node ID af947a20c2122b6d0c9978b04970b0a4d1e08e86 # Parent ecad68b73bcb09d999826750003accbe707da18c First server. diff -r ecad68b73bcb -r af947a20c212 mamba/forest.py --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mamba/forest.py Fri Sep 16 19:29:33 2011 +0200 @@ -0,0 +1,21 @@ +"""Where mamba's hang out with each other.""" + +from wsgiref.simple_server import make_server + + +class ForestApp(object): + """Where mamba's hang out and exchange levels.""" + + def __call__(self, environ, start_response): + status = '200 OK' + headers = [('Content-type', 'text/plain')] + start_response(status, headers) + + # The returned object is going to be printed + return ["Hello World"] + + +if __name__ == "__main__": + forest_app = ForestApp() + httpd = make_server('', 8000, forest_app) + httpd.serve_forever()