Gets the currently configured config path.
        :return: the path, raises ValueError if it doesn't exist.
176941
def _getConfigPath(self):
        
        confHome = environ.get('VIBE_CONFIG_HOME')
        return confHome if confHome is not None else path.join(path.expanduser("~"), '.vibe')
1290135
def get_conf_path_from_env():
    '''
    
    '''
    config_path = os.environ.get('PECAN_CONFIG')
    if not config_path:
        error = "PECAN_CONFIG is not set and " \
                "no config file was passed as an argument."
    elif not os.path.isfile(config_path):
        error = "PECAN_CONFIG was set to an invalid path: %s" % config_path
    else:
        return config_path

    raise RuntimeError(error)
643216
def load_path(self, path):
        
        logger.debug("load_path(path=%s)" % path)
        if os.path.isfile(path):
            configtype = self.guess_type(path)
            logger.debug("Detected config type: %s" % self._type_to_str(configtype))
            if configtype in self.TYPES:
                logger.debug("Opening config for reading")
                with open(path, 'r') as f:
                    data = f.read()
                datadict = self.TYPES[configtype]().reverse(data)
                return self.load_data(datadict)
            else:
                raise ValueError("Unsupported config type")
        else:
            logger.warn("load_path couldn't find the path: %s" % path)
789262
private static Path getConfigFilePath(Path projectPath) {
        String pathString = SystemProperty.CONFIGURATION_FILE.value();
        Path path;
        if (pathString == null) {
            path = DEFAULT_CONFIG_FILE;
        } else {
            path = Paths.get(pathString);
        }
        return projectPath.resolve(path);
    }
737335
def parse_config_path(args=sys.argv):
    

    config = CONFIG_PATH
    if '--config' in args:
        idx = args.index('--config')
        if len(args) > idx + 1:
            config = args.pop(idx + 1)
        args.pop(idx)
    return config
907441
def read_config(config_path=CONFIG_PATH):
    
    if not os.path.isfile(config_path):
        raise IOError("No config file found at %s" % config_path)
    config_parser = configparser.ConfigParser()
    config_parser.read(config_path)
    config = _config_parser_to_defaultdict(config_parser)
    return config
70456
def find_project_config_path(path=None):
    """"""
    path = Path(path) if path else Path.cwd()
    abspath = path.absolute()

    project_path = get_project_config_path(abspath)
    if project_path:
        return project_path

    for parent in abspath.parents:
        project_path = get_project_config_path(parent)
        if project_path:
            return project_path
735270
def _getConfigFile(self, config):
        

        joinPath = lambda p: (os.path.join(p) if isinstance(p, (tuple, list)) else p)

        if self.filepathConfig is not None and self.filenameConfig is not None:
            if hasattr(config, self.filepathConfig) and hasattr(config, self.filenameConfig):
                path = joinPath(getattr(config, self.filepathConfig))
                name = getattr(config, self.filenameConfig)

                if os.path.isfile(os.path.join(path, name)):
                    return open(os.path.join(path, name), 'r')

        if self.filepath is not None and self.filename is not None:
            path = joinPath(self.filepath)
            name = self.filename

            if os.path.isfile(os.path.join(path, name)):
                return open(os.path.join(path, name), 'r')
1170447
def load_config(self, path):
        
        self.config_path = path
        self.config.read(self.config_path)
145584
def dest_path(self):
        
        if os.path.isabs(self.config.local_path):
            return self.config.local_path
        else:
            return os.path.normpath(os.path.join(
                os.getcwd(),
                self.config.local_path
            ))
776041
def _get_config_file_in_folder(cls, path):
        
        if os.path.isfile(path):
            path = os.path.dirname(path)

        for fn in cls.PROJECT_CONFIG_FILES:
            config = RawConfigParser()
            full_path = os.path.join(path, fn)
            if config.read(full_path) and cls._get_section_name(config):
                return full_path
1052804
def get_lint_config(config_path=None):
    
    # config path specified
    if config_path:
        config = LintConfig.load_from_file(config_path)
        click.echo("Using config from {0}".format(config_path))
    # default config path
    elif os.path.exists(DEFAULT_CONFIG_FILE):
        config = LintConfig.load_from_file(DEFAULT_CONFIG_FILE)
        click.echo("Using config from {0}".format(DEFAULT_CONFIG_FILE))
    # no config file
    else:
        config = LintConfig()

    return config
93183
def get_data_path(cls):
        
        marvin_path = os.environ.get(cls._key)
        if not marvin_path:
            raise InvalidConfigException('Data path not set!')

        is_path_created = check_path(marvin_path, create=True)
        if not is_path_created:
            raise InvalidConfigException('Data path does not exist!')

        return marvin_path
959115
def locate(self, path):
        
        return Zconfig(lib.zconfig_locate(self._as_parameter_, path), False)
1157933
def get(self,path):
        
        path = path.upper()
        if path in self._configCache:
            return self._configCache[path]
        else :
            return self._findConfig(path)
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
24023
def get_config(path):
    
    if configparser is None:
        return None

    # Check for env specific configs first
    if os.path.exists(os.path.join(ROOT, 'config', NAME, path)):
        path = os.path.join(ROOT, 'config', NAME, path)
    else:
        path = os.path.join(ROOT, 'config', path)

    if not os.path.isfile(path):
        return None

    conf = open(path, 'rt').read()
    conf = os.path.expandvars(conf)

    config = configparser.SafeConfigParser()
    if sys.version_info[0] == 2:
        from io import StringIO
        config.readfp(StringIO(unicode(conf)))
    else:
        config.read_string(conf)
    return config