title: Python port binding
body: <p>I've recently been learning python and I just started playing with networking using python's <code>socket</code> library. Everything has been going well until recently when my script terminated without closing the connection. The next time I ran the script, I got:</p>
  
  <pre><code>File "./alert_server.py", line 9, in &lt;module&gt;
    s.bind((HOST, PORT))
  File "&lt;string&gt;", line 1, in bind
  socket.error: (98, 'Address already in use')
  </code></pre>
  
  <p>So it seems that something is still binded to the port, even though the python script isn't running (and I've verified this using <code>$px aux</code>. What's weird is that after a minute or so, I can run the script again on the same port and it will be fine. Is there any way to prevent/unbind a port for when this happens in the future?</p>