file_name = 'parameters.pickled'
parameters = pickle.load(open(file_name, 'rb'))
var1 = parameters['var1']
path = parameters['path_value']
print(('var1 =', var1))
print(('path =', path))
How to read parameter values from a file in Python