(path)
Returns list of search nodes for a given path.

  Args:
    path: One of '/Search' or '/Search/Contacts' only.
  Returns:
    nodes: list of search nodes for given path.
  Raises:
    DSException: Unable to retrieve search nodes in path.
Returns list of search nodes for a given path.
Returns list of search nodes for a given path .
def _GetCSPSearchPathForPath(path):
  """Returns list of search nodes for a given path.

  Args:
    path: One of '/Search' or '/Search/Contacts' only.
  Returns:
    nodes: list of search nodes for given path.
  Raises:
    DSException: Unable to retrieve search nodes in path.
  """

  command = [_DSCL, '-plist', path, '-read', '/', 'CSPSearchPath']
  (stdout, stderr, unused_returncode) = gmacpyutil.RunProcess(command)
  result = plistlib.readPlistFromString(stdout)
  if 'dsAttrTypeStandard:CSPSearchPath' in result:
    search_nodes = result['dsAttrTypeStandard:CSPSearchPath']
    return search_nodes
  else:
    raise DSException('Unable to retrieve search nodes: %s' % stderr)
def _GetCSPSearchPathForPath ( path ) : command = [ _DSCL , '-plist' , path , '-read' , '/' , 'CSPSearchPath' ] ( stdout , stderr , unused_returncode ) = gmacpyutil . RunProcess ( command ) result = plistlib . readPlistFromString ( stdout ) if 'dsAttrTypeStandard:CSPSearchPath' in result : search_nodes = result [ 'dsAttrTypeStandard:CSPSearchPath' ] return search_nodes else : raise DSException ( 'Unable to retrieve search nodes: %s' % stderr )