Setup the actual class.

        :param str filepath: path to the config-file (including file-name)
492146
def setup(self, filepath):
        
        self.log.debug("Loading JSON-file (%s)", filepath)
        self.load_json(filepath)
381349
def load(filepath=None, filecontent=None):
    
    conf = DotDict()

    assert filepath or filecontent
    if not filecontent:
        with io.FileIO(filepath) as handle:
            filecontent = handle.read().decode('utf-8')
    configs = json.loads(filecontent)
    conf.update(configs.items())
    return conf
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)
1170447
def load_config(self, path):
        
        self.config_path = path
        self.config.read(self.config_path)
801830
def addClassPath(path1):
    
    global _CLASSPATHS
    path1=_os.path.abspath(path1)
    if _sys.platform=='cygwin':
        path1=_posix2win(path1)
    _CLASSPATHS.add(str(path1))
779867
private void loadOptionsFromFile(String filepath){
        try {
            BufferedReader in = new BufferedReader(new FileReader(filepath));

            String stream0 = in.readLine();
            outlierAlgoPanel0.setStreamValueAsCLIString(stream0);

            String algo0 = in.readLine();
            outlierAlgoPanel0.setAlgorithm0ValueAsCLIString(algo0);

            System.out.println("Loading settings from "+filepath);
            logPanel.addText("Loading settings from "+filepath);

        } catch (Exception e) {
            System.out.println("Bad option file:"+e.getMessage());
        }
    }
271854
def load(filepath=None):
    
    if filepath and os.path.exists(filepath):
        pass
    else:
        if not os.path.exists('.env'):
            return False
        filepath = os.path.join('.env')

    for key, value in _get_line_(filepath):
        # set the key, value in the python environment vars dictionary
        # does not make modifications system wide.
        os.environ.setdefault(key, str(value))
    return True
1278093
protected void configureClassPath() throws Exception
    {
        //call each of the instances
        // first, configure the classpaths
        for (int i=0; i<_configurations.length;i++)
        {
            _configurations[i].setWebApplicationContext(this);
            _configurations[i].configureClassPath();
        }
    }
1012427
def parse_setup(filepath):
    ''''''
    # TODO: Need to parse setup.cfg and merge with the data from below

    # Monkey patch setuptools.setup to capture keyword arguments
    setup_kwargs = {}

    def setup_interceptor(**kwargs):
        setup_kwargs.update(kwargs)

    import setuptools
    setuptools_setup = setuptools.setup
    setuptools.setup = setup_interceptor

    # Manually compile setup.py
    with open(filepath, 'r') as f:
        code = compile(f.read(), '', 'exec')
    setup = ModuleType('setup')
    exec(code, setup.__dict__)

    # Remove monkey patch
    setuptools.setup = setuptools_setup
    return setup_kwargs
253365
def AddFile(self, filepath):
    
    if filepath not in self._files:
      self._files.add(filepath)
      return True
    return False
937695
def load_config(paths=DEFAULT_CONFIG_PATHS):
    
    config = Config()
    for path in paths:
        if os.path.isfile(path):
            config.load_pyfile(path)

    return config
1373448
def load_py(stream, filepath=None):
    
    with add_sys_paths(config.package_definition_build_python_paths):
        return _load_py(stream, filepath=filepath)
1163683
def load(filepath):
        '''
        
        '''

        try:
            with open(filepath, "r") as fh:
                source = fh.read()
        except Exception as e:
            return None, e
        return source, None
318107
def setBundlePath(path):
    
    if os.path.exists(path):
        Settings.BundlePath = path
    else:
        raise OSError("File not found: " + path)
19213
def set_path (self, path):
        
        assert isinstance(path, basestring)
        self.path_ = os.path.normpath(path)
1016288
def __read_config(self, file_path: str):
        
        if not os.path.exists(file_path):
            raise FileNotFoundError("File path not found: %s", file_path)
        # check if file exists
        if not os.path.isfile(file_path):
            log(ERROR, "file not found: %s", file_path)
            raise FileNotFoundError("configuration file not found %s", file_path)

        self.config.read(file_path)
1229604
def copy_file(self, filepath):
        
        copy_file = False
        try:
            copy_file = self.data[filepath]['copy']
        except KeyError:
            return False
        return copy_file