Modify the module search path.
541083
def modify_path():
    """"""
    # Only modify path on Windows.
    if os.name != "nt":
        return

    path = os.environ.get("PATH")
    if path is None:
        return

    try:
        extra_dll_dir = pkg_resources.resource_filename("bezier", "extra-dll")
        if os.path.isdir(extra_dll_dir):
            os.environ["PATH"] = path + os.pathsep + extra_dll_dir
    except ImportError:
        pass
950627
private void addResourceToModule(String resourcePath, CmsModule module) {

        List<String> currentRessources = Lists.newArrayList(module.getResources());
        for (String resource : currentRessources) {
            if (resourcePath.startsWith(resource)) {
                return;
            }
        }
        currentRessources.add(resourcePath);
        module.setResources(currentRessources);
    }
824013
public function modifyFile()
    {
        foreach (['chown', 'chgrp', 'chmod'] as $key) {
            $value = $this->{$key};
            if ($value) {
                $this->file->{$key}($value);
            }
        }
    }
1170734
def fixpath(path):
    """"""
    norm = osp.normcase if os.name == 'nt' else osp.normpath
    return norm(osp.abspath(osp.realpath(path)))
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))
1017549
def modify_kls(self, name):
        """"""
        if self.kls is None:
            self.kls = name
        else:
            self.kls += name
330614
def update_environment(lib_directory):
        """"""
        # Use this if you want to include modules from a subfolder
        # lib_path = os.path.realpath(
        #     os.path.abspath(
        #         os.path.join(
        #             os.path.split(inspect.getfile(inspect.currentframe()))[0], lib_directory)))
        lib_path = os.path.join(os.getcwd(), lib_directory)
        if 'PYTHONPATH' in os.environ:
            os.environ['PYTHONPATH'] = '{}{}{}'.format(
                lib_path, os.pathsep, os.environ['PYTHONPATH']
            )
        else:
            os.environ['PYTHONPATH'] = '{}'.format(lib_path)
27738
def _fixpath(root, base):
    """"""
    return os.path.abspath(os.path.normpath(os.path.join(root, base)))
624876
def on_browse_button_pressed(self):
        
        path = QFileDialog.getExistingDirectory(self.parentWidget(), "Choose a directory containing Python modules")

        if path:  # Non-empty means the user chose a path and clicked on OK
            self.path = path
            self.clear_button.setEnabled(True)
            self.folder_label.setText(path)
            logger.debug("User selects a custom module search path: {}".format(self.path))
393813
def add_config_path(self, path):
        
        abspath = util.abs_pathify(path)
        if abspath not in self._config_paths:
            log.info("Adding {0} to paths to search".format(abspath))
            self._config_paths.append(abspath)
874487
def patch_lustre_path(f_path):
    """"""

    if CHECK_LUSTRE_PATH_LEN and len(f_path) == 60:
        if os.path.isabs(f_path):
            f_path = '/.' + f_path
        else:
            f_path = './' + f_path

    return f_path
464733
protected function modifyPath(string $str): string
    {
        return (string) $this->filterDataPath($str)->withParameters($this->parameters);
    }
335729
def rewrite_file_imports(item, vendored_libs):
    """"""
    text = item.read_text(encoding='utf-8')
    for lib in vendored_libs:
        text = re.sub(
            r'(\n\s*)import %s(\n\s*)' % lib,
            r'\1from pythonfinder._vendor import %s\2' % lib,
            text,
        )
        text = re.sub(
            r'(\n\s*)from %s' % lib,
            r'\1from pythonfinder._vendor.%s' % lib,
            text,
        )
    item.write_text(text, encoding='utf-8')
489504
function getModulePath(module, path) {
        var modulePath = module.uri.substr(0, module.uri.lastIndexOf("/") + 1);
        if (path) {
            modulePath += path;
        }

        return modulePath;
    }
569959
def add_path_to_sys_path(self):
        """"""
        for path in reversed(self.get_spyder_pythonpath()):
            sys.path.insert(1, path)
977306
def file_modify(filename, settings):
        
        for k, v in settings.items():
            if k == "mode":
                os.chmod(filename,v)
            if k == "owners":
                os.chown(filename,v)
357097
def search_definition(self, module, keyword, arg):
        """"""
        r = module.search_one(keyword, arg)
        if r is not None:
            return r
        for i in module.search('include'):
            modulename = i.arg
            m = self.ctx.search_module(i.pos, modulename)
            if m is not None:
                r = m.search_one(keyword, arg)
                if r is not None:
                    return r
        return None