Friday, 27 September 2013

virtualenvwrapper: where is virtualenv info stored?

virtualenvwrapper: where is virtualenv info stored?

I regularly use setvirtualenvproject /path/to/my/project/ to set the
root/base directory of my virtual env. This is useful when switching to a
virtual env using workon myenv.
I was wondering though, if this path is available anywhere else?
In my case, I want to run a pre-push hook in git, and need to get the full
path to some of my files. e.g. something like this in my pre-push hook:
do_something $VIRTUALENV_PROJECT/my/important/file.txt
Is there any way I can retrieve this 'virtualenvproject' info, or where is
it stored?
I've tried looking in env, the .virtualenvs dir and every other place I
can think of, but I just can't find where the info's stored.

No comments:

Post a Comment