Carl Burks is a software developer for a global financial institution. With over ten years experience in technology and software development for financial organizations and over twenty years of software experience, Carl Burks provides articles, musings and insight into technology issues, software development, and other selected topics.

Watchdog and watchmedo for fun and pep8ing

2016-12-01T22:53:00.002-07:00

Authors:
Carl Burks

If you need to perform an action when a file is changed, or files in a directory are changed just install the python package watchdog. It comes with a utility "watchmedo".

I used it in combination with pep8 to automatically check my code. Here is how I did it:


watchmedo shell-command --patterns="*.py" --ignore-directories --recursive --command='pep8 "${watch_src_path}"'

Read more about watchdog