Detect module file changes and reload the program.
Tested working with:
- Python 2.7, 3.5
Demos:
Run:
pip install AoikLiveReload
Run:
git clone https://github.com/AoiKuiyuyou/AoikLiveReload
cd AoikLiveReload
python setup.py install
Add the 3 lines to your code:
# Import reloader class
from aoiklivereload import LiveReloader
# Create reloader
reloader = LiveReloader()
# Start watcher thread
reloader.start_watcher_thread()
Now when there is a module file change, the program will be reloaded.