Pragmatic Virtualenvwrapper with a subshell sandbox


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.


você pode gostar também