This may be a simple question, however i have looked for the answer for a while.
I am making a reed switch system that I need to be always on. I need to run a python file when the value of the input changes.
I want to avoid a constant loop in a single file if possible.
Ideally when the input is changed a file will be run. I am not sure where to write the code to do that or how to make it run another file.
Thanks In Advance