Editing Variables with Python
You may prefer to edit Variable values using Python rather than the Variables tab.
In this case, the value of the GsvKnob can be set and retrieved using the regular ‘setValue’ and ‘value’ functions, using a regular Python dictionary type:
For example:
rootGsvKnob = nuke.root()['gsv']
myValue = {'Custom': {'shot': 'sh001'}, '__default__': {'show': 'hot-chocolate'}}
rootGsvKnob.setValue(myValue)
print(rootGsvKnob.value())
# Result: {'Custom': {'shot': 'sh001'}, '__default__': {'show': 'hot-chocolate'}}