comparison 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
comparison
equal deleted inserted replaced
-1:000000000000 0:7a60bacc6a22
1 from svgsitemap import *
2 from webob import Request, Response
3
4 def example(environ, start_response):
5 link = '<a href="/%s">%s</a>'
6 body = '<br/>'.join([link % (i,i) for i in range(30)])
7 body = '<html><body>%s</body></html>' % body
8 response = Response(content_type='text/plain', body=body)
9 return response(environ, start_response)
10
11 def factory():
12 import pdb; pdb.set_trace()
13 app = MapserverMiddleware(example)
14
15 if __name__ == '__main__':
16 from wsgiref import simple_server
17 server = simple_server.make_server(host=host, port=int(54321), app=factory())
18 server.serve_forever()