[Tutor] Problems 'reloading'/'reimporting' module

Tim Johnson tim@johnsons-web.com
Sun Feb 9 17:49:01 2003


Hello All:
    Is it possible to 'reimport' a module in
python2.2 without restarting the interpreter?

I'm not having any luck in either Linux Konsole
or Xemacs python-mode.

In Linux Konsole if I make changes to code and
do 
  from tlib import *   # second time
changes are not reflected.

If I do  reload(tlib)
NameError: name 'tlib' is not defined

However, if I do this in the python-mode interpreter
window, I get what appears to be a successful reload
>>> reload(tlib)
<module 'tlib' from 'tlib.py'>

but changes are not shown.

Any help would be appreciated.
TIA
-- 
Tim Johnson <tim@johnsons-web.com>
      http://www.alaska-internet-solutions.com
      http://www.johnsons-web.com