Javascript Settings
Python Settings
- what i used
- else..
You can make if-elif block with the two codes below.
conda virtual environment
" Python Virtual Environment Support
python3 << EOF
import os
import subprocess
if "CONDA_PREFIX" in os.environ:
project_base_dir = os.environ["CONDA_PREFIX"]
script = os.path.join(project_base_dir, "bin/activate")
pipe = subprocess.Popen(". %s; env" % script, stdout=subprocess.PIPE, shell=True)
output = pipe.communicate()[0].decode('utf8').splitlines()
env = dict((line.split("=", 1) for line in output))
os.environ.update(env)
EOF
venv virtual environment
" Python Virtual Environment Support
python3 << EOF
import os
import subprocess
if "VIRTUAL_ENV" in os.environ:
project_base_dir = os.environ["VIRTUAL_ENV"]
script = os.path.join(project_base_dir, "bin/activate")
pipe = subprocess.Popen(". %s; env" % script, stdout=subprocess.PIPE, shell=True)
output = pipe.communicate()[0].decode('utf8').splitlines()
env = dict((line.split("=", 1) for line in output))
os.environ.update(env)
EOF