Adding Bottle framework in existing python script
gunjal.satish at gmail.com
gunjal.satish at gmail.com
Thu Oct 15 09:48:17 EDT 2015
In my python script I am doing bluetooth and RF communication on individual threads respectively. I want to add Rest Web Method in same script using Bottle web framework.
If I add below code, in existing python script, it wont work. How to make it work in existing script.
from bottle import Bottle, run
app = Bottle()
@app.route('/hello')
def hello():
return "Hello World!"
run(app, host='localhost', port=8080, debug = True)
More information about the Python-list
mailing list