enable_virtualenv.py 271 字节
Newer Older
1 2
import os

3

4
def __activate_virtual_env__():
5 6 7 8 9 10
    __path__ = os.getenv('VIRTUAL_ENV')
    if __path__ is None:
        return
    __script__ = os.path.join(__path__, 'bin', 'activate_this.py')
    execfile(__script__, {'__file__': __script__})

11 12

__activate_virtual_env__()