title: Get virtualenv's bin folder path from script
body: <p>I'm using virtualenvwrapper with a django project that has a management task that automatically writes some config files, so the user just has to</p>
  
  <pre><code>./manage.py generate_configuration &gt; much_nice.conf
  </code></pre>
  
  <p>And then move the file elsewhere. One of the generated config files is a task for supervisord that launches a celery worker. The problem I'm getting is that I don't know how to <strong>output the path of the celery executable</strong> that is <strong>within the bin folder</strong> of the virtualenv. Essentially, I'd like to have the output of the command</p>
  
  <pre><code>which celery
  </code></pre>
  
  <p>One option is using <code>sys.executable</code>, get the folder (which seems to be the <code>bin</code> folder of the virtualenv) and that's it... but I'm not sure.</p>
  
  <p>Doesn't virtualenv have any kind of method to get the path itself?</p>