Get option value from section. If an option is secure,
        populates the plain text.
764320
def get(self, section, option, *args):
        """"""
        if self.is_secure_option(section, option) and self.keyring_available:
            s_option = "%s%s" % (section, option)
            if self._unsaved.get(s_option, [''])[0] == 'set':
                res = self._unsaved[s_option][1]
            else:
                res = keyring.get_password(self.keyring_name, s_option)
        else:
            res = ConfigParser.get(self, section, option, *args)
        if res == '!!False!!':
            return False
        return res
257035
def parse_val(cfg,section,option):
    """"""
    vals = parse_vals(cfg,section,option)
    if len(vals)==0:
        return ''
    else:
        assert len(vals)==1, (section, option, vals, type(vals))
    return vals[0]
273334
def is_secure_option(self, section, option):
        
        if not self.has_section(section):
            return False
        if not self.has_option(section, option):
            return False
        if ConfigParser.get(self, section, option) == self._secure_placeholder:
            return True
        return False
676309
def values(self, section=None):
        """"""
        if not section and self.section:
            section = self.section
        config = self.config.get(section, {}) if section else self.config
        return config.values()
1024575
def apply(self, event = None):
  """"""
  for section in self.config.sections():
   # Run through the sections to check all the option values:
   for option, o in self.config.config[section].items():
    # Check the actual values against the validators and complain if necessary:
    if not o['include']:
     continue # This value is hidden, so there's no control for it.
    control = self._controls[section][option] # Get the actual control for GetValue
    try:
     value = type(o['value'])(control.GetValue()) # Try and convert the value
    except ValueError as msg:
     self.displayError(section, option, str(msg)) # Woops, something went wrong
     return False # Tells self.onOk not to close the window
    problem = None # Set up the problem variable.
    try:
     problem = o['validate'](value) # See if it passes the test
    except Exception as e:
     problem = str(e) # The lambda raised an exception.
    if problem:
     self.displayError(section, option, problem) # It didn't
     return False # Tells self.onOk not to close the window
    self.config.set(section, option, value) # All clear
  return True
690636
def _parse_text(val, **options):
    
    if val and options.get("ac_parse_value", False):
        return anyconfig.parser.parse_single(val)

    return val
153543
def read_boolean_option(self, section, option):
        """"""
        if self.has_option(section, option):
            self.config[option] = self.getboolean(section, option)
72271
def __get_default_value_from_element(self, element):
        

        if element.name == "select":
            options = element.find_all("option")
            is_multiple = element.has_attr("multiple")

            selected_options = [
                option for option in options
                if option.has_attr("selected")
            ]

            if not selected_options and options:
                selected_options = [options[0]]

            selected_values = []

            if is_multiple:
                for option in selected_options:
                    value = option["value"] if option.has_attr("value") else option.string
                    selected_values.append(value)

                return selected_values
            elif len(selected_options) >= 1:
                if selected_options[0].has_attr("value"):
                    return selected_options[0]["value"]
                else:
                    return selected_options[0].string

            return ""

        if element.name == "textarea":
            return element.string if element.string is not None else ""

        if element.name == "input" and element.has_attr("type"):
            if element["type"] in ("checkbox", "radio"):
                if not element.has_attr("checked"):
                    return False

                if element.has_attr("value"):
                    return element["value"]
                else:
                    return "on"

        if element.has_attr("value"):
            return element["value"]

        return ""
1172488
def parse_vals(cfg,section,option):
    """"""
    try:
        vals = cfg.get(section,option)
    except ConfigParser.NoSectionError as err:
        if section != 'DEFAULT':
            vals = cfg.get('DEFAULT',option)
        else:
            raise err
    vals = vals.split('#')[0]
    vals = vals.strip()
    vals = vals.split(',')
    vals = [v.strip() for v in vals]
    vals = [v for v in vals if len(v)]
    return vals
347956
def get_option_int(self, name, section=None, vars=None, expect=None):
        """"""
        val = self.get_option(name, section, vars, expect)
        if val:
            return int(val)
1117813
def get_config(section, option, allow_empty_option=True, default=""):
    '''
    
    '''
    try:
        value = config.get(section, option)
        if value is None or len(value) == 0:
            if allow_empty_option:
                return ""
            else:
                return default
        else:
            return value
    except ConfigParser.NoSectionError:
        return default
63018
def getfile(self, section, option, raw=False, vars=None, fallback="", validate=False):
        
        v = self.get(section, option, raw=raw, vars=vars, fallback=fallback)
        v = self._convert_to_path(v)
        return v if not validate or os.path.isfile(v) else fallback
470862
def option(self, option):
        
        if self.__current_section is None:
            raise RuntimeError('No section set in option-getting')
        return self.__config[self.__current_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
258092
def has_option(self, section, option):
        """"""
        if not section or section == self.default_section:
            option = self.optionxform(option)
            return option in self._defaults
        elif section not in self._sections:
            return False
        else:
            option = self.optionxform(option)
            return (option in self._sections[section]
                    or option in self._defaults)
1257519
public static String
value(String option) {
	if (table == null)
		return null;
	return ((String)table.get(option.toLowerCase()));
}
1324062
def get_option_value(elem):
    
    value = elem.get("value")
    if value is None:
        value = elem.text.strip()
    if value is None or value == "":
        msg = u"Error parsing value from {}.".format(elem)
        raise ValueError(msg)

    return value