Popular recipes by wurst2 http://code.activestate.com/recipes/users/1981772/2004-11-17T15:08:24-08:00ActiveState Code RecipesStoppable HTTP server (Python)
2004-11-17T15:08:24-08:00wurst2http://code.activestate.com/recipes/users/1981772/http://code.activestate.com/recipes/336012-stoppable-http-server/
<p style="color: grey">
Python
recipe 336012
by <a href="/recipes/users/1981772/">wurst2</a>
(<a href="/recipes/tags/web/">web</a>).
</p>
<p>Starting a SimpleHTTPServer instance in a separate thread makes it run forever. To solve this problem the server is augmented with a QUIT command. If sent it makes the server stop serving requests.</p>