Internal method to get an option.
 If value is callable without arguments
 it will be called and result will be returned.
973535
def raw_get(option)
      value = options_storage[option]
      Confo.callable_without_arguments?(value) ? value.call : value
    end
969524
def get_option(self, key):
        """"""
        return self._options.get(key, self._default_options[key])
1325295
def get_opt( self, opt):
    
    if self.__options.has_key(opt):
      return self.__options[opt]
    return None
822793
def get_choice(cls, value):
        
        attribute_for_value = cls.attributes[value]
        return cls._fields[attribute_for_value]
1228508
def getValue(self):
    '''
    
    '''
    dropdown_value = self.widget.GetValue()
    if not str(dropdown_value).isdigit():
      return ''
    arg = str(self.option_string).replace('-', '')
    repeated_args = arg * int(dropdown_value)
    return '-' + repeated_args
928484
def to_args(self):
        
        def has_value(name, value):
            """ Test for non-null option values.
            """
            null_values = ("False", "None", "[]", '""', "''", "0")
            if not value or value in null_values:
                return False
            if name in _arg_defaults:
                if str(value) == str(_arg_defaults[name]):
                    return False
            return True

        def filter_opt(name, value):
            """ Filter out preset and null-valued options.
            """
            if name in ("add_preset", "del_preset", "desc", "note"):
                return False
            return has_value(name, value)

        def argify(name, value):
            """ Convert sos option notation to command line arguments.
            """
            # Handle --verbosity specially
            if name.startswith("verbosity"):
                arg = "-" + int(value) * "v"
                return arg

            name = name.replace("_", "-")

            value = ",".join(value) if _is_seq(value) else value

            if value is not True:
                opt = "%s %s" % (name, value)
            else:
                opt = name

            arg = "--" + opt if len(opt) > 1 else "-" + opt
            return arg

        opt_items = sorted(self.dict().items(), key=lambda x: x[0])
        return [argify(n, v) for (n, v) in opt_items if filter_opt(n, v)]
679169
def get_value(self, key, args, kwargs):
        """"""
        if (self.tolerant and
                not isinstance(key, basestring) and
                key not in kwargs):
            key = str(key)

        return kwargs[key]
801138
def option(default_value):
    '''
    
    '''
    def _option(f):
        (args, varargs, kwargs, dflts) = getargspec_py27like(f)
        if varargs is not None or kwargs is not None or dflts:
            raise ValueError(
                'Options may not accept variable, variadic keyword, or default arguments')
        if len(args) != 1:
            raise ValueError('Parameter transformation functions must take exactly one argument')
        f._pimms_immutable_data_ = {}
        f._pimms_immutable_data_['is_param'] = True
        f._pimms_immutable_data_['default_value'] = default_value
        f._pimms_immutable_data_['name'] = f.__name__
        f = staticmethod(f)
        return f
    return _option
1222603
def _option(value):
    '''
    
    '''
    if value in __opts__:
        return __opts__[value]
    master_opts = __pillar__.get('master', {})
    if value in master_opts:
        return master_opts[value]
    if value in __pillar__:
        return __pillar__[value]
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'
1117983
def GetValue(self):
    '''
    
    '''
    if not self._widget.GetValue() or len(self._widget.GetValue()) <= 0:
        return None
    else:
        return self._action.option_strings[0]
768376
public Option getOption(String opt)
    {
        opt = Util.stripLeadingHyphens(opt);

        if (shortOpts.containsKey(opt))
        {
            return shortOpts.get(opt);
        }

        return longOpts.get(opt);
    }
571034
def _value_retriever(self, value):
        
        if self._use_as_callable(value):
            return value

        return lambda item: data_get(item, value)
594015
def get(self, option, default=undefined, cast=undefined):
        

        # We can't avoid __contains__ because value may be empty.
        if option in os.environ:
            value = os.environ[option]
        elif option in self.repository:
            value = self.repository[option]
        else:
            if isinstance(default, Undefined):
                raise UndefinedValueError('{} not found. Declare it as envvar or define a default value.'.format(option))

            value = default

        if isinstance(cast, Undefined):
            cast = self._cast_do_nothing
        elif cast is bool:
            cast = self._cast_boolean

        return cast(value)
543926
def get_option_value(self, opt_name):
        
        if not self.has_option(opt_name):
            raise ValueError("Unknow option name (%s)" % opt_name)
        return self._options[opt_name].value
602261
def getopt ( opt )
      result = { :n => '', :t => '', }
      if opt.length > OPTION_PREFIX_LONG.length then
        if opt[0, OPTION_PREFIX_LONG.length] == OPTION_PREFIX_LONG then
          result[:n] = opt[OPTION_PREFIX_LONG.length, opt.length]
          result[:t] = OPTION_PREFIX_LONG
          return result
        end
      end
      if opt.length > OPTION_PREFIX_SHORT.length then
        if opt[0, OPTION_PREFIX_SHORT.length] == OPTION_PREFIX_SHORT then
          result[:n] = opt[OPTION_PREFIX_SHORT.length, opt.length]
          result[:t] = OPTION_PREFIX_SHORT
          return result 
        end
      end
      return result
    end
1203344
def get_value(self, i=None, unit=None,
                  uncover=None, trail=None,
                  linebreak=None, sort_by_indep=None,
                  attr='_value'):
        

        value = getattr(self, attr)  # could be self._value or self._error
        if value is None:
            return None

        if uncover is None:
            uncover = self.call.uncover

        if trail is None:
            trail = self.call.trail

        if linebreak is None:
            linebreak = self.call.linebreak

        if sort_by_indep is None:
            # TODO: make this a property of the call?
            sort_by_indep = True

        if isinstance(value, str) or isinstance(value, float):
            if i is None:
                return self._to_unit(value, unit)
            elif isinstance(self.call.i.value, float):
                # then we still want to "select" based on the value of i
                if self._filter_at_i(i):
                    return value
                else:
                    return None
            else:
                # then we should show either way.  For example - a color or
                # axhline even with i given won't change in i
                return self._to_unit(value, unit)

        # from here on we're assuming the value is an array, so let's just check
        # to be sure
        if not isinstance(value, np.ndarray):
            raise NotImplementedError("value/error must be a numpy array")


        if linebreak is not False:
            return self._do_linebreak(func='get{}'.format(attr),
                                      i=i,
                                      unit=unit,
                                      uncover=uncover,
                                      trail=trail,
                                      linebreak=linebreak,
                                      sort_by_indep=sort_by_indep)

        if sort_by_indep is not False:
            # if we've made it here, linebreak should already be False (if
            # linebreak was True, then we'd be within _do_linebreak and those
            # get_value calls pass linebreak=False)
            return self._sort_by_indep(func='get{}'.format(attr),
                                       i=i,
                                       unit=unit,
                                       uncover=uncover,
                                       trail=trail,
                                       linebreak=False,
                                       sort_by_indep=sort_by_indep)

        # from here on, linebreak==False and sort_by_indep==False (if either
        # were True, then we're within those functions and asking for the original
        # array)
        if i is None:
            if len(value.shape)==1:
                return self._to_unit(value, unit)
            else:
                if isinstance(self.call, Plot):
                    return self._to_unit(value.T, unit)
                else:
                    return self._to_unit(value, unit)

        # filter the data as necessary
        filter_ = self._filter_at_i(i, uncover=uncover, trail=trail)

        if isinstance(self.call.i.value, float):
            if filter_:
                return self._to_unit(value, unit)
            else:
                return None

        if len(value.shape)==1:
            # then we're dealing with a flat 1D array
            if attr == '_value':
                if trail is not False:
                    trail_i = self._get_trail_min(i)
                    first_point = self.interpolate_at_i(trail_i)


                if uncover:
                    last_point = self.interpolate_at_i(i)
            else:
                first_point = np.nan
                last_point = np.nan

            if uncover and trail is not False:
                concat = (np.array([first_point]),
                          value[filter_],
                          np.array([last_point]))
            elif uncover:
                concat = (value[filter_],
                          np.array([last_point]))

            elif trail:
                concat = (np.array([first_point]),
                          value[filter_])
            else:
                return self._to_unit(value[filter_], unit)

            return self._to_unit(np.concatenate(concat), unit)

        else:
            # then we need to "select" based on the indep and the value
            if isinstance(self.call, Plot):
                return self._to_unit(value[filter_].T, unit)
            else:
                return self._to_unit(value[filter_], unit)