Python – Killing Python webservers

python

I am looking for a simple Python webserver that is easy to kill from within code. Right now, I'm playing with Bottle, but I can't find any way at all to kill it in code. If you know how to kill Bottle (in code, no Ctrl+C) that would be super, but I'll take anything that's Python, simple, and killable.

Best Solution

We use this.

import os
os._exit(3)

To crash in a 'controlled' way.