title: How do I shut down a python simpleHTTPserver?
body: <p>So I'm trying to learn d3, and the <a href="https://github.com/mbostock/d3/wiki" rel="noreferrer">wiki</a> suggested that  </p>
  
  <blockquote>
    <p>To view the examples locally, you must have a local web server. Any
    web server will work; for example you can run Python's built-in
    server:</p>
    
    <p><code>python -m SimpleHTTPServer 8888 &amp;</code> </p>
  </blockquote>
  
  <p>Great... only now I have a server running... but at some point I think I should probably shut that down again. </p>
  
  <p>Is there a better way of shutting it down than using <code>kill &lt;pid&gt;</code>? That seems like kind of a big hammer for a little job.  </p>
  
  <p>(I'm running Mac OS 10.6.8 (Snow Leopard))</p>
  
  <p>FWIW: <code>ctrl+c</code> gives about 10 lines of traceback, complaining about being interrupted.</p>
  
  <p><code>kill -3 &lt;pid&gt;</code> gives a Finder warning in a separate window 'Python quit unexpectedly'. </p>
  
  <p>The default <code>kill &lt;pid&gt;</code> and <code>kill -15 &lt;pid&gt;</code> are relatively clean (and simple). </p>