4 ms·
That's a bit awkward, I'm currently working on a package[1] that does more or less the same thing in more or less the same way (I think), except you don't need
by breuleux 6y ago
That's a bit awkward, I'm currently working on a package[1] that does more or less the same thing in more or less the same way (I think), except you don't need to decorate anything. Just run
`python -m jurigged script.py` or `jurigged script.py` instead of `python script.py` and it will watch everything in the current working directory.
There's still some bugs I have to iron out, though, it should be better in a month or so. Still, you can pip install it if you want.
[1] https://github.com/breuleux/jurigged https://github.com/breuleux/jurigged
- ArchOversight 6y agoHave you looked at `hupper` from the Pylons Project? The author posted here: https://news.ycombinator.com/item?id=26039366 https://news.ycombinator.com/item?id=26039366
- breuleux 6y agoSeems fairly different. My tool does not restart the process, it hot patches functions and methods whenever they are modified in the source, like the OP.
- tbt43p 6y agowhy is such feature of reloading needed in the first place? I am a beginner thanks
- vermilingua 6y agoAccellerates the dev process by removing a whole bunch of steps: terminating the running program, relaunching the running program, repeating any steps to get back to the code in question. While these things only take maybe a few seconds each, thats a few seconds that you’ll perform maybe hundreds of times. Reducing context switches is always a good thing.
- okso 6y agoalbertzeyer's example with Notch explains the issue pretty well: When working on a video game, restarting the game every time you are tweaking the behaviour of an entity takes a lot of time. Hot code reloading while keeping the state of the game makes development much easier. On the other hand, when the entire state is stored outside of the Python app (eg: a web app using a database), restarting the entire process and reloading the page is fast enough and more reliable.