Loads the settings for generic options that take FQDN and a boolean value
    (1 or 0).

    Args:
        packname (str): name of the package to get config settings for.
        package: actual package object.
485136
def _load_generic(packname, package, section, target):
    
    from acorn.config import settings
    spack = settings(packname)
    if spack.has_section(section):
        secitems = dict(spack.items(section))
        for fqdn, active in secitems.items():
            target[fqdn] = active == "1"
207177
@Override
    public T addPackage(String pack) throws IllegalArgumentException {
        Validate.notNull(pack, "Package must be specified");

        return addPackages(false, pack);
    }
747120
def settings(package, reload_=False):
    
    global packages
    if package not in packages or reload_:
        from os import path
        result = CaseConfigParser()
        if package != "acorn":
            confpath = _package_path(package)
            _read_single(result, confpath)
        _read_single(result, _package_path("acorn"))
        packages[package] = result

    return packages[package]
680565
function getPackageConfigMatch(loader, normalized) {
    var pkgName, exactMatch = false, configPath;
    for (var i = 0; i < loader.packageConfigPaths.length; i++) {
      var packageConfigPath = loader.packageConfigPaths[i];
      var p = packageConfigPaths[packageConfigPath] || (packageConfigPaths[packageConfigPath] = createPkgConfigPathObj(packageConfigPath));
      if (normalized.length < p.length)
        continue;
      var match = normalized.match(p.regEx);
      if (match && (!pkgName || (!(exactMatch && p.wildcard) && pkgName.length < match[1].length))) {
        pkgName = match[1];
        exactMatch = !p.wildcard;
        configPath = pkgName + packageConfigPath.substr(p.length);
      }
    }

    if (!pkgName)
      return;

    return {
      packageName: pkgName,
      configPath: configPath
    };
  }
1094525
def check_package_data(dist, attr, value):
    """"""
    if isinstance(value, dict):
        for k, v in value.items():
            if not isinstance(k, str):
                break
            try:
                iter(v)
            except TypeError:
                break
        else:
            return
    raise DistutilsSetupError(
        attr + " must be a dictionary mapping package names to lists of "
        "wildcard patterns"
    )
317095
def import_settings_class(setting_name):
    
    config_value = getattr(settings, setting_name)
    if config_value is None:
        raise ImproperlyConfigured("Required setting not found: {0}".format(setting_name))

    return import_class(config_value, setting_name)
414829
def loadOrInitSettings(self, groupName=None):
        
        groupName = groupName if groupName else self.settingsGroupName
        settings = QtCore.QSettings()

        #for key in sorted(settings.allKeys()):
        #    print(key)

        if containsSettingsGroup(groupName, settings):
            self.loadSettings(groupName)
        else:
            logger.info("Group {!r} not found, falling back on default settings".format(groupName))
            for item in self.getDefaultItems():
                self.registerItem(item)
            self.saveSettings(groupName)
            assert containsSettingsGroup(groupName, settings), \
                "Sanity check failed. {} not found".format(groupName)
958590
def _load_subclasses(package):
    
    global _explicit_subclasses
    from acorn.config import settings
    spack = settings(package)
    if spack is not None:
        if spack.has_section("subclass"):
            _explicit_subclasses.update(dict(spack.items("subclass")))
732311
def load_model(self, config):
        
        for package_name in getattr(config.app, 'modules', []):
            module = __import__(package_name, fromlist=['model'])
            if hasattr(module, 'model'):
                return module.model
        return None
1073610
def current_package=(val)
      @current_package_id = case val
      when ChipPackage
        val.id
      else
        packages.include?(val) ? val : nil
      end
    end
133024
private boolean isIncluded(String _fqcn) {
        if (includePackageNames.contains(_fqcn)) {
            return true;
        }

        String packageName = _fqcn.substring(0, _fqcn.lastIndexOf('.') + 1);
        for (String str : includePackageNames) {
            if (packageName.startsWith(str)) {
                return true;
            }
        }

        return false;
    }
381764
def package_filter(config, message, package=None, *args, **kw):
    

    package = kw.get('package', package)
    if package:
        return package in fmn.rules.utils.msg2packages(message, **config)
497282
def load_config(filename, filepath=''):
    

    FILE = path.join(filepath, filename)

    try:
        cfg.read(FILE)
        global _loaded
        _loaded = True
    except:
        print("configfile not found.")
305263
def load_config(fname: str) -> ModelConfig:
        
        config = ModelConfig.load(fname)
        logger.info('ModelConfig loaded from "%s"', fname)
        return cast(ModelConfig, config)
299206
def get_option_boolean(self, name, section=None, vars=None, expect=None):
        
        val = self.get_option(name, section, vars, expect)
        val = val.lower() if val else 'false'
        return val == 'true'
1374305
def load_module(self, fullname):
        
        mod = sys.modules.setdefault(fullname, imp.new_module(fullname))
        mod.__file__ = self._path
        mod.__loader__ = self
        mod.__path__ = []
        mod.__package__ = fullname
        return mod
58595
public OvhPackAdsl packName_GET(String packName) throws IOException {
		String qPath = "/pack/xdsl/{packName}";
		StringBuilder sb = path(qPath, packName);
		String resp = exec(qPath, "GET", sb.toString(), null);
		return convertTo(resp, OvhPackAdsl.class);
	}