Get Default value for a given (section, option)
        -> useful for type checking in 'get' method
348683
def get_default(self, section, option):
        
        section = self._check_section_option(section, option)
        for sec, options in self.defaults:
            if sec == section:
                if option in options:
                    return options[ option ]
        else:
            return NoDefault
797149
def __option(self):
		
		section = self.section()
		option = self.option_prefix()
		if self.config().has_option(section, option) is False:
			raise NoOptionError(option, section)
		return section, option
925754
def _get_option_value(self, key):
        
        fn_name = "set_{}_value".format(key)
        if key in self.overrides:
            val = self.overrides[key]
        elif hasattr(self, fn_name):
            val = getattr(self, fn_name)()
        else:
            val = self.defaults[key]["d"]

        if self.defaults[key]["t"] == constants.FT_PARAM:
            return val.split("|")
        else:
            return val
708544
def _get_secedit_value(option):
    '''
    
    '''
    secedit_data = _get_secedit_data()
    for _line in secedit_data:
        if _line.startswith(option):
            return _line.split('=')[1].strip()
    return 'Not Defined'
951283
function(opt, field_name, default_value) {
    if(typeof field_name === 'string') {
      // case of single string
      return (typeof opt[field_name] !== 'undefined') ? opt[field_name] : default_value;
    } else {
      // assume we are given a list of string instead
      var ret = default_value;
      for(var i=0;i<field_name.length;i++) {
        var f = field_name[i];
        if (typeof opt[f] !== 'undefined') {
          ret = opt[f]; // overwrite return value
        }
      }
      return ret;
    }
  }
1234479
def option(self, section, option):
        
        if self.config.has_section(section):
            if self.config.has_option(section, option):
                return (True, self.config.get(section, option))
            return (False, 'Option: ' + option + ' does not exist')
        return (False, 'Section: ' + section + ' does not exist')
594276
public String getValue(Option option) {
        if (option == null) {
            return null;
        }
        String[] values = getValues(option);
        return (values == null ? null : values[0]);
    }
109712
def GetValue(self):
    '''
    
    '''
    self.AssertInitialization('Optional')
    value = self._widget.GetValue()
    if not value or len(value) <= 0:
      return None
    return ' '.join(
      [self._action.option_strings[0],  # get the verbose copy if available
       value])
995749
def get(self, po):
        
        name = po.name
        typ = po.typ
        default = po.default

        handler = getattr(self, '_get_{}'.format(typ), None)
        if handler is None:
            raise ValueError(typ)
        self.seen.add(name)

        # pylint: disable=not-callable
        if not self.parser.has_option(self.section, name):
            if default is REQUIRED:
                raise NameError(self.section, name)
            if isinstance(default, INHERIT_GLOBAL):
                return handler('global', name, default.default)
            # don't return default here, give the handler a chance to modify
            # the default, e.g. pw_uid with default='root' returns 0.

        return handler(self.section, name, default)
1318559
def get(self, section, name, default=None, **kw):
        """"""
        try:
            return self.unbound_method(self.instance, section, name, **kw)
        except Exception:
            return default
957410
def get_default_values(self):
        """"""
        if not self.process_default_values:
            # Old, pre-Optik 1.5 behaviour.
            return optparse.Values(self.defaults)

        # Load the configuration, or error out in case of an error
        try:
            self.config.load()
        except ConfigurationError as err:
            self.exit(UNKNOWN_ERROR, str(err))

        defaults = self._update_defaults(self.defaults.copy())  # ours
        for option in self._get_all_options():
            default = defaults.get(option.dest)
            if isinstance(default, string_types):
                opt_str = option.get_opt_string()
                defaults[option.dest] = option.check_value(opt_str, default)
        return optparse.Values(defaults)
877257
private String getValue(Class<?> section, String name) {

		if (section == null || name == null) {
			log.warn("Section or name is null, Section:'" + section
					+ "' name:'" + name + "'");
			return null;
		}

		if (fildes != null && lastModified != fildes.lastModified()) {
			getFileProperties(filePath);
		}

		// Getting the full name
		String propertyName = getPropertyName(section, name);

		// The tryng from file properties
		Object obj = fileProperties.get(propertyName);
		if (obj != null) {
			if (log.isDebugEnabled()){
				log.debug("propertyName:'" + propertyName + "' and value:'" + obj
						  + "' from file:'" + filePath + "'");
			}
			if (ObjectUtils.NULL.equals(obj)) {
				return null;
			} else {
				return (String) obj;
			}
		}

		// Else using the short name into the file properties

		String ret = (String) fileProperties.get(name);
		if (ret != null) {
			return (String) ret;
		}
		// Si es nulo al final se guardara en la cache

		// // try from the default path
		// Properties prop=FilePropertyUtils.getProperties(section);
		// if (prop!=null) {
		// // try the full cualified name
		// ret=prop.getProperty(name);
		// if (ret!=null) {
		// log.debug("propertyName:'"+propertyName+"' from file.prop");
		// fileProperties.put(propertyName,ret);
		// return (String)ret;
		// }
		// }

		// Getting property from system Propertie
		ret = (String) System.getProperty(propertyName);
		if (ret != null) {
			if (log.isDebugEnabled()){
				log.debug("Property name:'" + propertyName
						  + "' found in system properties.");
			}
			return ret;
		}

		// Sets the NULL value to this key
		fileProperties.put(propertyName, ObjectUtils.NULL);

		return null;
	}
431806
def getboolean_config(section, option, default=False):
    '''
    
    '''
    try:
        return config.getboolean(section, option) or default
    except ConfigParser.NoSectionError:
        return default
382678
function getOption(opts, key, def) {
  var value = opts[key];
  return value === undefined ? def : value;
}
1063379
function $$getDefaultValue() {
      if (!injector) throw new Error("Injectable functions cannot be called at configuration time");
      var defaultValue = injector.invoke(config.$$fn);
      if (defaultValue !== null && defaultValue !== undefined && !self.type.is(defaultValue))
        throw new Error("Default value (" + defaultValue + ") for parameter '" + self.id + "' is not an instance of Type (" + self.type.name + ")");
      return defaultValue;
    }
1186333
def get_int_value(self, section, option, default=0):
        """"""
        try:
            return self.parser.getint(section, option)
        except NoOptionError:
            return int(default)
841284
def set_option(self, section, option, value):
        
        if self.config.has_section(section):
            self.config.set(section, option, value)
            return (True, self.config.options(section))
        return (False, 'Section: ' + section + ' does not exist')