Re:Reloadr – Hot code reloading tool for Python
by ArchOversight on Friday February 05, 2021 @01:19PM
(#26039453)
Have you looked at `hupper` from the Pylons Project?
The author posted here: https://news.ycombinator.com/item?id=26039366
Re:Reloadr – Hot code reloading tool for Python
by breuleux on Friday February 05, 2021 @02:21PM
(#26040141)
Seems 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.
Re:Reloadr – Hot code reloading tool for Python
by tbt43p on Friday February 05, 2021 @06:37PM
(#26042576)
why is such feature of reloading needed in the first place?
I am a beginner
thanks
Re:Reloadr – Hot code reloading tool for Python
by vermilingua on Friday February 05, 2021 @06:55PM
(#26042706)
Accellerates 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.
Re:Reloadr – Hot code reloading tool for Python
by okso on Saturday February 06, 2021 @07:02AM
(#26045984)
albertzeyer'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.
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