Forums

Staring a new virtualenv automatically in a console

Is this possible?

Every time I start a console to run some jobs (since they reset all the time) I type the command:

$ source .virtualenvs/pytopic/bin/activate

but it would be cool to have it loaded from the start.

If not, is there a way to make a shortcut for this command?

You could just use

workon pytopic

It's shorter and the pytopic will autocomplete if you hit tab and have typed enough characters so the name is unambiguous.