Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Calling env/bin/python directly, as opposed to `source activate` is very handy for things like:

* bash command line

* cron

* or daemon manager like supervisord



Yep. Years ago I settled on a convention of always installing a virtualenv into a 've' directory in the project so I can just set the shebang line on scripts (eg, django's manage.py) to "#!ve/bin/python". My Django project template sets all that up for me automatically. So now I just have muscle memory for typing "./manage.py ..." etc and I never have to activate virtualenvs, mess around with virtualenvwrapper type hacks or accidently run one project's script with a different project's virtualenv activated.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: