comparison web/index.py @ 333:298e502fdcd4

Add some web server handling
author Matt Johnston <matt@ucc.asn.au>
date Tue, 12 Jun 2012 00:09:09 +0800
parents
children e3e0ed7758f9
comparison
equal deleted inserted replaced
332:05c1249da994 333:298e502fdcd4
1 #!/usr/bin/env python2.7
2
3 import bottle
4 from bottle import route, request
5
6 @route('/update', method='post')
7 def update():
8 return "Done"
9
10 @route('/graph.png')
11 def graph():
12 pass
13
14 @route('/')
15 def top():
16 return bottle.template('top', urlparams=request.query_string)
17
18 def main():
19 bottle.debug(True)
20 bottle.run(port=9999, reloader=True)
21
22 if __name__ == '__main__':
23 main()
24
25