I have a bunch of variables in a Python script like this:
pauseTime = 10
cameraSrc = "rtsp://cameraadress"
useCuda = True
But I'm getting from an API the new values for this variables and I'm trying to do the following:
for key,value in func.configJsonIot.items():
if key == "debug":
continue
else:
if debug:
print("Sobrescrevendo valores locais pelos da API key: {} | value: {}".format(key, value))
eval(str(key)) = value
this is returning me this error:
SyntaxError: cannot assign to function call
How can I change the global variables with the API values?