# need file: tools.py , eeprom.py from tools import Tuning from eeprom import get_tuning, save_tuning print("\n\n___ test tools.py dictionary: Tuning") SampleRate = Tuning.get("SampleRate",10) # _____________ get from tools.py ( imported ) 30, if not exist use default 10 print("___ get SampleRate from tools.py from Tuning: ",SampleRate ) Tuning = get_tuning(True) #_____________________________ overwrite Tuning from tools.py by tuning from eeprom.py and optional print it from there SampleRate = Tuning.get("SampleRate",10) print("___ get SampleRate from Tuning from NVM: ",SampleRate ) SampleRate = 60 #_______________________________________ now we change that value print("___ local overwrite SampleRate: ",SampleRate ) Tuning["SampleRate"] = SampleRate # ____________________ save to dictionary print("___ saved to Tuning: ",Tuning ) save_tuning(Tuning,True) # _____________________________ save to NVM print("\n___ end \n")