首页 > 代码库 > Bottle python

Bottle python

1. hello world. URL hander

import bottle@bottle.route(/)def home_page():    return "hello world\n"@bottle.route(/testpage)def test_page():    return "this is a test page"bottle.debug(True)bottle.run(host=localhost,port=8080)

 

Bottle python