Module h2o_wave.autoreload
Functions
add_reload_hook
Add a function to be called before reloading the process.
Note that for open file and socket handles it is generally preferable to set the FD_CLOEXEC
flag (using fcntl
oros.set_inheritable
) instead of using a reload hook to close them.
main
Command-line wrapper to re-run a script whenever its source changes.
Scripts may be specified by filename or module name::
python -m h2o_wave -m h2o_wave.test.runtests python -m h2o_wave h2o_wave/test/runtests.py
Running a script with this wrapper is similar to callingwait() at the end of the script, but this wrapper can catch import-time problems like syntax errors that would otherwise prevent the script from reaching its call to wait().
rerun
wait
Wait for a watched file to change, then restart the process.
Intended to be used at the end of scripts like unit test runners, to run the tests again after any source file changes (but see also the command-line interface in main())