DirectSlider Help

I am trying to save the value from my direct slider to a global variable. I’m new to panda so any help you can give me is appreciated

Here is my code so far:

        self.speedSlider = DirectSlider(range=(150,350), value=250, pageSize=5, command=self.speedValue, scale = (.5,1,.15))

Just use a global variable?

global arrowspeed
arrowspeed = self.speedSlider['value']

For my game I’m using a global dictionary full of config variables.
This way it’s easier to load/save everything from/to a file.
In the menu you can change the values in the dictionary (I have a DirectSlider for Audio Volume) and either let these changes be temporary or save them permanently to the config file.