Hotreload
hot reload your python code!
Install / Use
/learn @say4n/HotreloadREADME
Run any arbitrary python script every time the code changes in the file.
installation
Get the package from PyPI with pip3 install hotreload.
warning
You shouldn't do this and this can have unexpected, unintended repurcusions. Proceed with caution, you have been warned!
usage
Say you have script (script.py) that you want to run every time the code
changes in that file.
To do that, it is as simple as doing this:
import time
import logging
from hotreload import Loader
if __name__ == "__main__":
logging.basicConfig(level=logging.INFO)
script = Loader("script.py")
while True:
# Check if script has been modified since last poll.
if script.has_changed():
# Execute a function from script if it has been modified.
script.main()
time.sleep(1)
author
Sayan Goswami © 2020
Related Skills
node-connect
335.9kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
82.7kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
335.9kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
82.7kCommit, push, and open a PR
