reloading modules

J

Joseph Krauze

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,534
Members
45,008
Latest member
Rahul737

Latest Threads

Top