Mercurial > mamba
changeset 328:af947a20c212
First server.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Fri, 16 Sep 2011 19:29:33 +0200 |
parents | ecad68b73bcb |
children | 172eac039c91 |
files | mamba/forest.py |
diffstat | 1 files changed, 21 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- /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()