Bottle web framework - How to stop?
问题 When starting a bottle webserver without a thread or a subprocess, there's no problem. To exit the bottle app -> CTRL + c . In a thread, how can I programmatically stop the bottle web server ? I didn't find a stop() method or something like that in the documentation. Is there a reason ? 回答1: For the default (WSGIRef) server, this is what I do (actually it is a cleaner approach of Vikram Pudi's suggestion): from bottle import Bottle, ServerAdapter class MyWSGIRefServer(ServerAdapter): server =