title: finding distutils installation directories after installation
body: <p>Distutils allow users to fine-tune installation paths with <code>setup.py</code> options such as <code>--prefix</code>, <code>--install-purelib</code>, <code>--install-scripts</code>, <code>--install-data</code> etc.  But <strong>how do I find the value given to these options <em>after</em> installation</strong>?</p>
  
  <p>I've read some discussions here on stackoverflow, but could find no references to the values of these <code>setup.py</code> options.</p>
  
  <p>My specific problem is:</p>
  
  <ul>
  <li>I need to access a file setup by the <code>datafiles=</code> install option
  <ul>
  <li>→ Which goes to <code>--install-data</code>, default <code>--prefix</code> (which, by the way, doesn't match <code>sys.prefix</code> like the docs say);</li>
  </ul></li>
  <li>From a script installed via <code>scripts</code>
  <ul>
  <li>→ Which goes to <code>--install-scripts</code>, default <code>--prefix</code> + <code>/bin</code>.</li>
  </ul></li>
  </ul>
  
  <p>I've been looking at <code>..</code> relative from the scripts' directory, but this broke for users on a different system.  If I could query the value of the installation options, it would work for all cases.</p>