reloading modules

Joseph Krauze jkrauze at ccs.neu.edu
Wed Dec 3 12:18:07 EST 2003


Assume a main python file that does the following:

from lib_mod import performAction
def main():
	return performAction("myFile")

Now, if I modify lib_mod.py and just try to reload main.py, lib_mod is not
updated.  I have searched online and came upon a few tinkers but nothing
that seemed to be blessed by python.org.  Is there a feature or an
official modification that I'm missing?

Otherwise, I'll probably always do a try on a reload at the top of main.py
but that does not seem too robust to me.

I am using 2.3.2 on CLI.

Thanks,
Joe




More information about the Python-list mailing list