title: Python analog of Unix 'which'
body: <p>In *nix systems one can use <code>which</code>  to find out the full path to a command. For example:</p>
  
  <pre><code>$ which python
  /usr/bin/python
  </code></pre>
  
  <p>or <code>whereis</code> to show all possible locations for a given command</p>
  
  <pre><code>$ whereis python
  python: /bin/python.exe /bin/python2.5-config /usr/bin/python.exe /usr/bin/python2.5-config /lib/python2.4 /lib/python2.5 /usr/lib/python2.4 /usr/lib/python2.5 /usr/include/python2.4 /usr/include/python2.5 /usr/share/man/man1/python.1
  </code></pre>
  
  <p>Is there an easy way to find out the location of a module in the PYTHONPATH. Something like:</p>
  
  <pre><code>&gt;&gt;&gt; which (sys)
  'c:\\Python25\Lib\site-packages'
  </code></pre>