I am playing around with some deep learning algorithms and I need a way to periodically read the intermediate result and change some of the system variables.

Any ideas on how to best approach this problem?  I was thinking of something basic, like having the program periodically read and write from some files.

Thanks,
Anatoly