title: virtualenvwrapper functions unavailable in shell scripts
body: <p>So, once again, I make a nice python program which makes my life ever the more easier and saves a lot of time. Ofcourse, this involves a virtualenv, made with the <code>mkvirtualenv</code> function of virtualenvwrapper. The project has a requirements.txt file with a few required libraries (requests too :D) and the program won't run without these libraries.</p>
  
  <p>I am trying to add a <code>bin/run-app</code> executable shell script which would be in my path (symlink actually). Now, inside this script, I need to switch to the virtualenv before I can run this program. So I put this in</p>
  
  <pre><code>#!/bin/bash
  # cd into the project directory
  workon "$(cat .venv)"
  python main.py
  </code></pre>
  
  <p>A file <code>.venv</code> contains the virtualenv name. But when I run this script, I get <code>workon: command not found</code> error.</p>
  
  <p>Of course, I have the virtualenvwrapper.sh sourced in my bashrc but it doesn't seem to be available in this shell script.</p>
  
  <p>So, how can I access those virtualenvwrapper functions here? Or am I doing this the wrong way? How do you launch your python tools, each of which has its own virtualenv!?</p>