pydoc -p fails with gaierror
<p>I'm getting this strange error when I try to use pydoc to look at python documentation.</p>

<pre><code>$ pydoc -p 10000
pydoc server stopped
Traceback (most recent call last):
  File "/usr/bin/pydoc", line 5, in &lt;module&gt;
    pydoc.cli()
  File "/usr/lib/python2.7/pydoc.py", line 2281, in cli
    serve(port, ready, stopped)
  File "/usr/lib/python2.7/pydoc.py", line 2057, in serve
    DocServer(port, callback).serve_until_quit()
  File "/usr/lib/python2.7/pydoc.py", line 2039, in __init__
    self.base.__init__(self, self.address, self.handler)
  File "/usr/lib/python2.7/SocketServer.py", line 408, in __init__
    self.server_bind()
  File "/usr/lib/python2.7/BaseHTTPServer.py", line 108, in server_bind
    SocketServer.TCPServer.server_bind(self)
  File "/usr/lib/python2.7/SocketServer.py", line 419, in server_bind
    self.socket.bind(self.server_address)
  File "/usr/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
socket.gaierror: [Errno -2] Name or service not known
</code></pre>

<p>I've tried reinstalling python and trying several different ports to no avail.  Also</p>

<pre><code>$ python -m SimpleHTTPServer
</code></pre>

<p>works fine.  I'm not really sure why this is happening, could it be some bug?</p>
