code: def set_option_value(self, name, value):
  		
  		option = self.get_option(name)
  		old_value = option.value
  		if option.type in ('str', 'rfile'):
  			option.value = value
  		elif option.type == 'int':
  			value = value.lower()
  			if not value.isdigit():
  				if value.startswith('0x') and string_is_hex(value[2:]):
  					value = int(value[2:], 16)
  				else:
  					raise TypeError('invalid value type')
  			option.value = int(value)
  		elif option.type == 'flt':
  			if value.count('.') > 1:
  				raise TypeError('invalid value type')
  			if not value.replace('.', '').isdigit():
  				raise TypeError('invalid value type')
  			option.value = float(value)
  		elif option.type == 'bool':
  			if value.lower() in ['true', '1', 'on']:
  				option.value = True
  			elif value.lower() in ['false', '0', 'off']:
  				option.value = False
  			else:
  				raise TypeError('invalid value type')
  		else:
  			raise Exception('unknown value type')
  		if option.callback and not option.callback(value, old_value):
  			option.value = old_value
  			return False
  		return True
docs: Set an option's value.
  
  		:param str name: The name of the option to set the value for.
  		:param str value: The value to set the option to, it will be converted from a string.
  		:return: The previous value for the specified option.