Skip to content

Instantly share code, notes, and snippets.

@gh640
Created November 25, 2013 01:19
Show Gist options
  • Save gh640/7634816 to your computer and use it in GitHub Desktop.
Save gh640/7634816 to your computer and use it in GitHub Desktop.
A sublime text 2 build setting for Python virtualenvwrapper. To use a specific python env for running scripts, it is necessary to get virtualenvwrapper active and environment to switch.
{
// "cmd": ["python", "-u", "$file"],
"shell": true,
"cmd": ["source ~/.bashrc && workon name_of_virtualenv && python -u \"$file\""],
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"selector": "source.python"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment