Execute python file on change fswatch
fswatch tracks file system events. Execute a command on file change
(taken from 1 as reference to search in the future):
fswatch -0 file.py | xargs -0 -I {} command
Explanation:
- 
-Osplit record byNULcharacter - 
xargs -Omatches fswatch splitting - 
-Irun given command on each file changes