- python の file watcher library
- 付属の cli tool
watchmedoで nodemon みたいなことできるauto-restartコマンドを利用する感じ
- 正直
watchdog側は使うことなさそう
# install only watchmedo
$ python -m pip install "watchdog[watchmedo]"
# using like nodemon
#
# - current directory `.` の `*.py` を監視
# - ↑ 変更されたら `--` 以降を restart してくれる
#
$ watchmedo auto-restart -d . -p '*.py' -- python your_script.py