in scripts/ebcli_installer.py [0:0]
def _activate_virtualenv(virtualenv_location):
"""
Function activates virtualenv, ".ebcli-virtual-env", created apriori for the
rest of the lifetime of this script.
:param virtualenv_location: the relative or absolute path to the location
where the virtualenv, ".ebcli-virtual-env", was
created by this script.
:return None
"""
if sys.platform.startswith('win32'):
activate_script_directory = 'Scripts'
else:
activate_script_directory = 'bin'
activate_this_path = os.path.join(
virtualenv_location,
VIRTUALENV_DIR_NAME,
activate_script_directory,
'activate_this.py'
)
if sys.version_info < (3, 0):
execfile(activate_this_path, dict(__file__=activate_this_path))
else:
exec(open(activate_this_path).read(), dict(__file__=activate_this_path))