Add a key with the path to each payload_info_dict.
506597
def _add_path(dir_name, payload_info_list):
    """"""
    for payload_info_dict in payload_info_list:
        file_name = payload_info_dict['filename'] or payload_info_dict['pid']
        payload_info_dict['path'] = d1_common.utils.filesystem.gen_safe_path(
            dir_name, 'data', file_name
        )
31803
def add_path(searchpath, encoding='utf-8', followlinks=False):
    """"""
    if not _has_jinja:
        raise RuntimeError(_except_text)
    _jload.add_loader(FileSystemLoader(searchpath, encoding, followlinks))
786512
def configure(paths, relative_to):

    """"""

    if not paths:
        return
    for path in [normalize_path(p, relative_to) for p in paths]:
        logger.debug('configuration path {0}'.format(path))
        pubkeys_path = join(path, PUBKEYSDIR)
        if os.path.exists(pubkeys_path):
            load_pubkeys(pubkeys_path, PUBKEYS)
        init_module(path)
922052
def get_paths(self, key):
        ""
        result_list = []
        if key in self.keys():
            result_list.append(((key,), self[key]))
        for sub_key, v in self.items():
            if isinstance(v, self.__class__):
                sub_res_list = v.get_paths(key)
                for key_path, res in sub_res_list:
                    result_list.append(((sub_key,) + key_path, res))
            elif isinstance(v, dict):
                if key in v.keys():
                    result_list.append(((sub_key, key), v[key]))
        return result_list
294281
def add_path(self, w, h):
        """"""
        path = self._add_path()
        path.w, path.h = w, h
        return path
227414
def expand_path(path, params = {})
      path = path.dup
      path = "/#{path}" unless path =~ /^\// # make sure path starts with /
      path = "/#{option(:api_version)}#{path}" unless path =~ /^\/v[\d.]+\// # preprend api version
      params.each do |key, value|
        path << (path['?'] ? '&' : '?')
        path << expand_param(key, value)
      end
      path
    end
691075
def _nest_payload(self, keys, payload):
        
        if len(keys) == 0:
            return payload

        return {keys[0]: self._nest_payload(keys[1:], payload)}
829023
def add_to_path(p):
    """"""
    if p not in os.environ["PATH"]:
        os.environ["PATH"] = "{0}{1}{2}".format(p, os.pathsep, os.environ["PATH"])
454583
def install_API_key(api_key, profile_name='default'):
    """"""
    fname = API_profile_fname(profile_name)
    if not os.path.isdir(os.path.dirname(fname)):
        os.makedirs(os.path.dirname(fname))
    with open(fname, 'w') as fh:
        fh.write(api_key)
441692
def subkeys(self, path):
        
        for _ in subpaths_for_path_range(path, hardening_chars="'pH"):
            yield self.subkey(_)
1048023
def push(self, my_dict, key, element):
        '''  '''
        group_info = my_dict.setdefault(key, [])
        if isinstance(group_info, dict):
            host_list = group_info.setdefault('hosts', [])
            host_list.append(element)
        else:
            group_info.append(element)
998342
def add(self, dist):
        
        if dist.path not in self.path:
            self.path[dist.path] = dist
            self.name.setdefault(dist.key, []).append(dist)
158343
def add_info(self, data):
        """"""
        for key in data:
            # verboten
            if key in ('status','state','name','id','application','services','release'):
                raise ValueError("Sorry, cannot set build info with key of {}".format(key))
            self.obj[key] = data[key]
        self.changes.append("Adding build info")
        return self
866240
def path_to_key(filepath):
        """"""
        tmp, last = os.path.split(filepath)
        tmp, middle = os.path.split(tmp)
        return '{}{}{}'.format(os.path.basename(tmp), middle,
                               os.path.splitext(last)[0])
599540
def join_path(a, *p):
    """"""
    path = a
    for b in p:
        if len(b) == 0:
            continue
        if b.startswith('/'):
            path += b[1:]
        elif path == '' or path.endswith('/'):
            path += b
        else:
            path += '/' + b
    # END for each path token to add
    return path
1217138
def SetKeyPathPrefix(self, key_path_prefix):
    
    self._key_path_prefix = key_path_prefix
    self._key_path_prefix_length = len(key_path_prefix)
    self._key_path_prefix_upper = key_path_prefix.upper()
1296285
def build_info(name, path=None, module=None):
    """"""
    verlist = get_version_list(path, module)
    verlist[0] = name
    return tuple(verlist)