def _get_env_activate(bin_env):
 if (not bin_env):
  raise CommandNotFoundError('Could not find a `activate` binary')
 if os.path.isdir(bin_env):
  if salt.utils.is_windows():
   activate_bin = os.path.join(bin_env, 'Scripts', 'activate.bat')
  else:
   activate_bin = os.path.join(bin_env, 'bin', 'activate')
  if os.path.isfile(activate_bin):
   return activate_bin
 raise CommandNotFoundError('Could not find a `activate` binary')

def _get_env_activate ( bin_env ) : if ( not bin_env ) : raise CommandNotFoundError ( 'Could not find a `activate` binary' ) if os . path . isdir ( bin_env ) : if salt . utils . is_windows ( ) : activate_bin = os . path . join ( bin_env , 'Scripts' , 'activate.bat' ) else : activate_bin = os . path . join ( bin_env , 'bin' , 'activate' ) if os . path . isfile ( activate_bin ) : return activate_bin raise CommandNotFoundError ( 'Could not find a `activate` binary' )
return the path to the activate binary .