Automatic reload()?
Michael Hudson
mwh21 at cam.ac.uk
Sat Jun 3 17:12:32 EDT 2000
"Daehyok Shin" <sdhyok at email.unc.edu> writes:
> Is there no program to reload all the changed modules automatically?
I have this in my ~/.pythonrc:
def rr(keepem=sys.modules.keys()):
for i in sys.modules.keys():
if type(sys.modules[i]) is types.ModuleType and i not in keepem:
print "reloading",i
reload(sys.modules[i])
I can't remember quite what the "keepem" bit's for, but I presume
there was some reason I put it in...
HTH,
Michael
--
Ya, ya, ya, except ... if I were built out of KSR chips, I'd
be running at 25 or 50 MHz, and would be wrong about ALMOST
EVERYTHING almost ALL THE TIME just due to being a computer!
-- Tim Peters, 30 Apr 97
More information about the Python-list
mailing list