title: How can I use pew in a bash/Python/Fabric/sh script?
body: <p>I have recently begun using <a href="https://pypi.python.org/pypi/pew" rel="nofollow">pew</a> rather than <a href="https://pypi.python.org/pypi/virtualenvwrapper" rel="nofollow">virtualenvwrapper</a> + <a href="https://pypi.python.org/pypi/virtualenv" rel="nofollow">virtualenv</a>.</p>
  
  <p>This is a nice alternative when working in an interactive shell. However, I still use virtualenvwrapper in my bash scripts [1], and I am considering writing some virtualenv-aware Python scripts [2].</p>
  
  <p>Given that <code>pew workon</code> launches a new prompt, can I use it in shell [3] and Python scripts? If so, how?</p>
  
  <p>[1] Using the following snippet, which is precisely what I'm trying to move away from:</p>
  
  <pre><code># make sure we can workon (the path is Ubuntu-specific)
  [[ $(type -t workon) == "function" ]] || source /etc/bash_completion.d/virtualenvwrapper
  </code></pre>
  
  <p>[2] I'm still investigating which of plain Python, <a href="https://pypi.python.org/pypi/Fabric" rel="nofollow">Fabric</a> and <a href="https://pypi.python.org/pypi/sh" rel="nofollow">sh</a> will best suit my needs.</p>
  
  <p>[3] Secretly, I would prefer to use it in fish rather than bash, but that seems esoteric :)</p>