I am trying to automate running any Python file in a directory when the file is saved. That way, the doctests will run, and I don't have to switch away from the editor.
My problem is that whenever I save a .py file, it runs twice.
Here's my command:
ls *.py | entr -p python /_
The -p is to postpone until the file is saved, and that works fine.