The following forum message was posted by fabioz at http://sourceforge.net/projects/pydev/forums/forum/293649/topic/4531661:
Hi there,
PyDev actually had such a feature, but it was removed because Python itself
does not have a good reload solution (one example: when reloading a module which
has a method, it'd have to update any references to the old method to point
to the new method, or make the old method redirect to the new method, etc.),
so, it was removed until someone is able to make it work reliably... (the solutions
could potentially break applications).
So, while there's no totally reliable solution, you can try for yourself one
of the solutions below, which may work (or not) for your specific use-case (it
seems they already evolved a bit since the last time it was integrated in PyDev,
so, I may end up checking it again).:
http://www.indelible.org/ink/python-reloading/
http://code.google.com/p/reimport/
Cheers,
Fabio
p.s.: May be related or not, but usually working with unit-tests may ease getting
to the point you want... (the usual modus operandi for test driven development
would be: write a test, run it, see it fail and only then go on to fix it, in
which case, reload isn't really that important -- although I agree that sometimes,
changing the code you're debugging can give you good results regardless
of that).
|