setupvirtualenv
This is an oldie, but a goodie.
Python devs love virtualenv. I love virtualenv. Who doesn't love virtualenv?
If you're unfamiliar, it's a tool to create isolated Python environments
.
As a dev, honing your environment and tools to optimize your coding experience is pretty commonplace. I have a bunch of virtualenvs and associated projects on my machine. When I activate a virtualenv, I imagine that I want to work on that virtualenv's associated project about 99.9% of the time. So why not automatically move into that directory?
Customizing a .virtualenvs/<project name>/bin/postactivate
file per project can be tedious, so I wrote this script to smooth out that experience:
https://gist.github.com/loisaidasam/acef984a312b48c6d7a4f592a7497a17
Just copy setupvirtualenv
and postactivate_template
into your ~/.bin/
directory, chmod 755 on setupvirtualenv
, and you'll be up and running.
Happy Tuesday!