enable_virtualenv.py 257 字节
Newer Older
1 2 3 4 5 6 7 8 9 10
import os

def __activate_virtual_env__():
  __path__ = os.getenv('VIRTUAL_ENV')
  if __path__ is None:
    return
  __script__ = os.path.join(__path__, 'bin', 'activate_this.py')
  execfile(__script__, {'__file__': __script__})

__activate_virtual_env__()