As a note to omz, Bottle's inclusion isn't documented and should be. It's a great mini-framework for web apps, and likely isn't getting as much use as it should. I discovered Bottle independently a few weeks ago and installed it on my device manually. I did a double-take after reading ccc's reply that it's already included.
For users, be sure to reference Bottle's version 0.11 documentation -- the default displayed on the bottlepy.org website is for version 0.13 and the syntax is different.
Regarding the Pythonista-only 'stop_when_done' option (ccc linked to and made the github change correctly but typo'd above), you can use os.name to optionally add the parameter so your script will run on the desktop without throwing an error. This is handy if you do development or testing on the desktop before copying the script to your device.
if os.name is 'posix':
webbrowser.open('http://localhost:8080', stop_when_done=True)
else:
webbrowser.open('http://localhost:8080')