(self, key, value, save=True)
Set a UserPref value.
		Also saves the object.
Set a UserPref value.
		Also saves the object.
Set a UserPref value . Also saves the object .
def set_userpref(self, key, value, save=True):
		"""
		Set a UserPref value.
		Also saves the object.
		
		"""
		d = self.get_data()
		prefs = d.setdefault("userprefs", {})
		
		prefs[key] = value
		
		self.set_data(d)
		
		if save:
			self.save()
def set_userpref ( self , key , value , save = True ) : d = self . get_data ( ) prefs = d . setdefault ( "userprefs" , { } ) prefs [ key ] = value self . set_data ( d ) if save : self . save ( )