comparison example/example.py @ 9:aa4eab6dc994

* dont set node width, height; * move save() to its own function
author Jeff Hammel <jhammel@mozilla.com>
date Sun, 02 Jan 2011 11:39:45 -0800
parents 30d03e830354
children 1b077cb84be5
comparison
equal deleted inserted replaced
8:1d16bde33eee 9:aa4eab6dc994
12 def factory(): 12 def factory():
13 dirname = os.path.dirname(os.path.abspath(__file__)) 13 dirname = os.path.dirname(os.path.abspath(__file__))
14 inifile = os.path.join(dirname, 'example.gv.txt') 14 inifile = os.path.join(dirname, 'example.gv.txt')
15 svgfile = os.path.join(dirname, 'example.svg') 15 svgfile = os.path.join(dirname, 'example.svg')
16 app = MapserverMiddleware(example, svgfile) 16 app = MapserverMiddleware(example, svgfile)
17 app = SVGSiteMap(app, file=inifile, output=svgfile, name='foo.com') 17 app = SVGSiteMap(app, file=inifile, output=svgfile)
18 return app 18 return app
19 19
20 if __name__ == '__main__': 20 if __name__ == '__main__':
21 from wsgiref import simple_server 21 from wsgiref import simple_server
22 server = simple_server.make_server(host='0.0.0.0', port=int(54321), app=factory()) 22 server = simple_server.make_server(host='0.0.0.0', port=int(54321), app=factory())