@staticmethod
    def setSetting(moduleName, settingName, settingValue):
        settingPath = "%s/%s" % (moduleName, settingName)     
        slicer.app.settings().setValue(settingPath, settingValue)
Set the value of a setting in Slicer
dataset/ETHPy150Open acil-bwh/SlicerCIP/Scripted/CIP_Common/CIP/logic/SlicerUtil.py/SlicerUtil.setSetting