import, from and reload

John Salerno johnjsal at NOSPAMgmail.com
Thu Mar 2 16:12:31 CET 2006


I understand that after you import something once, you can reload it to 
pick up new changes. But does reload work with from statements? I tried 
this:

from X import *

and then did my testing. I changed X and tried to reload it, but that 
didn't seem to work. I figure the reason is because the module itself 
doesn't exist as an object, only its names do. But I couldn't figure out 
how to pick up my new changes at this point. I think eventually I did

import X

and that sort of started me back from the beginning, with my changes. 
But is there a way to continue to use a from statement instead, and then 
reload your changes?



More information about the Python-list mailing list