Autonomia & Tecnologia

Pragmatic Virtualenvwrapper with a subshell sandbox

7

Virtualenvwrapper makes working with Virtualenv a real pleasure. But for me it wasn’t enough, just because I’m that lazy.

My idea was to type one command and get right into the repository directory. I’d like it to happen within a subshell so I would not need to deactivate the virtual environment. All I would need to do is press CTRL+D to exit the subshell and close my sandbox.

To accomplish it, I managed to write this scratch shell script function:

Having virtualenv and virtualenvwrapper installed on your system, just append this function to the end of your .profile or .bash. And type: work envname.

[]’s!

você pode gostar também
  • Jonatas C. D.

    Henrique, e se eu quisesse manter no terminal algo informando qual o env estou trabalhando?

  • jonatascd

    Henrique, e se eu quisesse manter no terminal algo informando qual o env estou trabalhando?

  • jonatascd

    Henrique, e se eu quisesse manter no terminal algo informando qual o env estou trabalhando?

  • I share your laziness: my standard project config involves something like the following additions to the postactivate file: