When I save a python source code file, I want to re-run the script. Is there a command that works like this (sort of like nodemon for node)?
The most similar way to nodemon I found is by using the watchdog package:
pip install watchdog
This comes with a utility called watchmedo:
watchmedo shell-command \
--patterns="*.py" \
--command='python "${watch_src_path}"' \
.
Now just work on your .py and it will be executed every time you save the file.