re-importing modules



Hi,

When troubleshooting code that's saved in a text file, I often find that I
want to make a change to it, re-save it, then reimport it. However, just
typing

import myTestCode

doesn't always seem to import the newer version. Is it supposed to? I find
that right now I often have to close my iPython window, then reopen it and
import my recently modified code. I know this can't be the best way to do
this, but I don't know what is.

any suggestions/help welcome and appreciated,
trevis




.



Relevant Pages

  • Re: re-importing modules
    ... When troubleshooting code that's saved in a text file, ... want to make a change to it, re-save it, then reimport it. ... probably need to use the reload() function. ...
    (comp.lang.python)
  • Re: re-importing modules
    ... When troubleshooting code that's saved in a text file, ... want to make a change to it, re-save it, then reimport it. ... In addition to the warning that reload() does not recursively reload ...
    (comp.lang.python)