paster serve
has --reload
option to auto-restart serving wsgi application when any of Python source files or the CONFIG_FILE
changes.
How to make paster initiate auto-restart also when some other file (not Python source file) changes?
UPDATE
watch_file()
function suggested by mksh looks like the solution to the problem. However mksh suggested adding its invocation to the application's entry point which seems to be more invasive than it should. Can I (non-intrusively) extend Paste's serve
command adding new option which would result in invocation of watch_file()
with filenames read from the app's section in CONFIG_FILE
?