Gets a single named preference

        :returns: the value, typed to str/bool/int/float regarding its content.
178332
def get_preference(self, pref_name):
        
        resp = self.request_single('GetPrefs', {'pref': {'name': pref_name}})
        return utils.auto_type(resp['_content'])
41455
def get_value(self, name):
        
        factory = self._registered.get(name)
        if not factory:
            raise KeyError('Name not registered')
        if factory._giveme_singleton:
            if name in self._singletons:
                return self._singletons[name]
            self._singletons[name] = factory()
            return self._singletons[name]
        elif factory._giveme_threadlocal:
            if hasattr(self._threadlocals, name):
                return getattr(self._threadlocals, name)
            setattr(self._threadlocals, name, factory())
            return getattr(self._threadlocals, name)
        return factory()
379181
def get(self, value, cfg=None):
        
        if value is None and cfg:
            if self.option_type == 'list':
                value = cfg.get_list(self.name, None)
            else:
                value = cfg.get(self.name, None)

        if value is None:
            value = self.default
        else:
            parse_method = getattr(self, 'parse_%s' % (self.option_type), None)
            if parse_method:
                value = parse_method(value)
        return value
1080576
def get_singleton(self):
        
        only_value = None
        for value in six.itervalues(self.ordered_dict):
            # This loop will raise if it runs more than once.
            if only_value is not None:
                raise ValueError("%r is not a singleton." % self)

            only_value = value

        if only_value is self.__UnsetSentinel or only_value is None:
            raise ValueError("%r is empty." % self)

        return only_value
981046
def _get_bool_val(self, name):
        
        element = getattr(self, name)
        if element is None:
            return None
        return element.val
241208
def _read_preference_for(self, session):
        
        # Override this operation's read preference with the transaction's.
        if session:
            return session._txn_read_preference() or self.__read_preference
        return self.__read_preference
1092502
def value(self):
        
        choice = weighted_choice(self._responses)

        # If the choice is a tuple, join the elements into a single mapped string
        if isinstance(choice, tuple):
            return ''.join(map(str, choice)).strip()

        # Otherwise, return the choice itself as a string
        return str(choice)
1127865
def currentValue(self):
        
        enum  = self.enum()
        if ( self.isCheckable() ):
            value = 0
            for i in self.checkedIndexes():
                value |= enum[nativestring(self.itemText(i))]
            return value
        else:
            try:
                return enum[nativestring(self.itemText(self.currentIndex()))]
            except KeyError:
                return 0
1332242
def get_scalar(self, name, preference='cell', info=False):
        
        return get_scalar(self, name, preference=preference, info=info)
708098
def getInt(self, name, default=0, parent_search=False, multikeys_search=False):
		
		try:
			value = self.get(name, default, parent_search, multikeys_search)
			return int(value)

		except:
			# pas de configuration trouvé ou convertion impossible ?
			return default
133653
def getNamedActionValue(self, name):
        
        actions = self._actions

        if (type (actions) is list):
            for a in actions:
                if a.get('name', 'NoValue') == name:
                    dict =a
        else:
            dict = actions
        return dict.get('value', 'NoValue')
531719
def getChildValue(self, childName, default=None, childNumber=0):
        
        child = self.contents.get(toVName(childName))
        if child is None:
            return default
        else:
            return child[childNumber].value
1069118
def get_option(self, name, default=None):
        
        if self.options is None:
            return default
        return self.options.get(name, default)
425832
def get_value(self, class_name, attr, default_value=None,
                  state='normal', base_name='View'):
        
        styles = self.get_dict_for_class(class_name, state, base_name)
        try:
            return styles[attr]
        except KeyError:
            return default_value
26017
private static String getXtextKey(String preferenceContainerID, String preferenceName) {
		return GENERATOR_PREFERENCE_TAG + PreferenceConstants.SEPARATOR + preferenceContainerID
				+ PreferenceConstants.SEPARATOR + preferenceName;
	}
702875
def get(self, name: str, default: Any = None) -> Any:
        """"""
        return super().get(name, [default])[0]
375210
def get_default_value(self):
        
        val = self.show
        if not val:
            val = self.raw_value
        if not val:
            val = self.showname
        return val