tags:

views:

229

answers:

3

Hi guys, If I make some changes to one of the files belonging to a running app, is there a way to tell the python runtime to automatically reload the module/file?

Cheers Naren

+3  A: 

Here is a very old module that I posted nearly ten years ago. I may no longer work with current Python versions (I have not checked) but it may give some ideas.

http://mail.python.org/pipermail/python-list/2000-April/031741.html

theller
+1 for the code you wrote being in the accepted answer :)
Van Gale
...and the highest voted answer since the Django module started with CherryPy.
Van Gale
Hey, I didn't even know that.
theller
+5  A: 

Take look at Django's autoreload module. It works very well.

Alexander Artemenko
+5  A: 

Take at look at CherryPy's Autoreload feature. I think it looks quite simple and always worked well for me.

optixx