Naren
Naren

Reputation: 724

How to automatically reload a python file when it is changed

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?

Upvotes: 8

Views: 2080

Answers (3)

theller
theller

Reputation: 2879

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/031568.html

Upvotes: 4

optixx
optixx

Reputation: 2120

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

Upvotes: 5

Alexander Artemenko
Alexander Artemenko

Reputation: 22776

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

Upvotes: 4

Related Questions