Created
June 19, 2018 22:43
-
-
Save mathcass/2d6b8a183d742f484a9385c32ad80b0d to your computer and use it in GitHub Desktop.
Direnv function to aid with loading local virtualenv directories
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Usage: layout_virtualenv <path> | |
# | |
# Sets and loads a Python virtualenvironment from a local path | |
# Eg. `layout_virtualenv venv` | |
layout_virtualenv() { | |
local venv_path=${1:-venv} | |
log_status "Loading $venv_path" | |
load_prefix ${venv_path} | |
source ${venv_path}/bin/activate | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment