Search option in application options.
 Return option key-name if option found, else return nil.
 option  -- object formed by getopt.
 options -- options object list.
353787
def option_search( option, options )
      # Search in global options list
      options.each_value do |opt|
        return opt.longname.to_sym if option_compare( option, opt )
      end
      return nil
    end
635225
def get_options(self):
        
        choices = self._field_choices()
        if choices:
            return [c[1] for c in choices]
        else:
            return self.model.objects.\
                order_by(self.name).\
                values_list(self.name, flat=True)
163168
def option(option, *args)
      args.size > 0 ? set(option, args.first) : get(option)
    end
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])
766305
def hasOption(self, name):
    
    name = name.strip()
    for o in self.options:
      if o.short == name or o.long == name:
        return True
    return False
626418
def getOption(self, name):
    
    name = name.strip()
    for o in self.options:
      if o.short == name or o.long == name:
        return o
    raise InterfaceException("No such option: " + name)
257751
def get_options_for_id(options: Dict[str, Dict[str, Any]], identifier: str):
    
    check_var(options, var_types=dict, var_name='options')
    res = options[identifier] if identifier in options.keys() else dict()
    check_var(res, var_types=dict, var_name='options[' + identifier + ']')
    return res
1292322
def get_options(self, hidden=False):
        
        return dict((opt['name'], opt) for opt in self.get_ordered_options(hidden=hidden))
370800
def fetch(flag)
      o = option(flag)
      if o.nil?
        cleaned_key = clean_key(flag)
        raise UnknownOption.new("option not found: '#{cleaned_key}'", "#{cleaned_key}")
      else
        o.value
      end
    end
997819
def get(self, option, default=None):
        ''''''
        val = self[option]
        return (val is None and default) or val
899964
private static String getName(Opt option, Field field) {
        if (option.name().equals(Opt.DEFAULT_STRING)) {
            return field.getName();
        } else {
            return option.name();
        }
    }
834558
def get_attribute_option(self, attribute, option_name):
        
        self.__validate_attribute_option_name(option_name)
        attribute_key = self.__make_key(attribute)
        return self.__attribute_options[attribute_key].get(option_name)
1006839
def _get_options(options_file=None):
    

    if options_file is not None:
        with open(options_file, 'r') as opt_file:
            options = json.loads(opt_file.read())
    else:
        options = {}
    return options
1279668
function getOption(opts) {
  return {
    tag: 'option',
    attrs: {
      disabled: opts.disabled,
      value: opts.value
    },
    children: opts.text,
    key: opts.value
  };
}
186340
def selected?(str_or_rx)
      by_text = options(text: str_or_rx)
      return true if by_text.find(&:selected?)

      by_label = options(label: str_or_rx)
      return true if by_label.find(&:selected?)

      return false unless (by_text.size + by_label.size).zero?

      raise(UnknownObjectException, "Unable to locate option matching #{str_or_rx.inspect}")
    end
725890
def get_options_values(self, hidden=False):
        
        values = {}
        for opt_name, opt in self._options.items():
            if hidden or not opt.hidden:
                values[opt_name] = opt.value
        return values
471698
def resolved_option(options, target, key):
    
    option_value = options.get(key)
    if not isinstance(target, AppBase) or options.is_flagged(key):
      return option_value
    v = target.payload.get_field_value(key, None)
    return option_value if v is None else v