diff example/example.py @ 0:7a60bacc6a22

initial commit
author Jeff Hammel <jhammel@mozilla.com>
date Mon, 27 Dec 2010 22:09:09 -0800
parents
children 084088505eea
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/example/example.py	Mon Dec 27 22:09:09 2010 -0800
@@ -0,0 +1,18 @@
+from svgsitemap import *
+from webob import Request, Response
+
+def example(environ, start_response):
+    link = '<a href="/%s">%s</a>'
+    body = '<br/>'.join([link % (i,i) for i in range(30)])
+    body = '<html><body>%s</body></html>' % body
+    response = Response(content_type='text/plain', body=body)
+    return response(environ, start_response)
+
+def factory():
+    import pdb; pdb.set_trace()
+    app = MapserverMiddleware(example)
+
+if __name__ == '__main__':
+    from wsgiref import simple_server
+    server = simple_server.make_server(host=host, port=int(54321), app=factory())
+    server.serve_forever()