title: Calling pydoc in OSX - how do the links work, exactly?
body: <p>calling <code>pydoc file</code> is returning, <code>bad interpreter. no such file or directory.</code></p>
  
  <p>There's a <a href="https://stackoverflow.com/questions/3391998/pydoc-is-not-working-windows-xp">workaround</a> by calling it like <code>python -m pydoc file</code>. </p>
  
  <p>I would love to understand the way the links work better. For example what does the following do? <pre><code>sudo ln -s /System/Library/Frameworks/Python.framework/Versions/2.7/bin/pydoc /usr/bin/pydoc</code></pre> - which one is linking to which? </p>
  
  <p>I'm running version 2.7 and pydoc exists in the /usr/bin/, as do pydoc2.5 and pydoc2.6. Same issue with python-config, which also exists in 2.5 and 2.6 versions.</p>
  
  <p>Thanks a lot for any insight.</p>
  
  <p>Here's how problem was solved, based on correct answer below:</p>
  
  <ul>
  <li><p>re-downloaded the python framework from <a href="http://andilabs.com/Python.framework.zip" rel="nofollow noreferrer">http://andilabs.com/Python.framework.zip</a> after finding it via <a href="https://stackoverflow.com/questions/10212270/python-asks-for-older-paths-on-mac-after-deleting-duplicate-python-installation?rq=1">Python asks for older paths on mac after deleting duplicate python installation</a></p></li>
  <li><p>made a backup copy of <code>pydoc2.7</code> by running <code>sudo mv pydoc2.7 pydoc 2.7-orig</code> </p></li>
  <li>copied the newly downloaded <code>pydoc2.7</code> to the framework version 2.7 bin using <code>sudo cp /Users/mikekilmer/Downloads/Python.framework/Versions/2.7/bin/pydoc2.7 /System/Library/Frameworks/Python.framework/Versions/2.7/bin/</code>. </li>
  </ul>
  
  <p>Apparently whatever i had under pydoc2.7 was not the right thing. Thanks a lot for explaining how links work!</p>