[Tutor] problem with reload()

Tony Cappellini tony@tcapp.com
Thu Jan 16 01:33:02 2003


After importing a module initially,
when I try to reload a module in Ipython, PythonWin, or Idle
I always get the following error message- like reload() doesn't work

reload(ch2_10)
Traceback (most recent call last):
   File "<stdin>", line 1, in ?
NameError: name 'ch2_10' is not defined

ch2_10.py IS in the current directory, as verified by
In [2]: os.chdir('e:\.ipython\pyclass\hw2')
In [3]: os.system('dir ch2_10.*');raw_input()
  Volume in drive E is WIN_2000
  Directory of e:\.ipython\pyclass\hw2
01/15/2003  09:39p                 695 ch2_10.pyc
01/15/2003  09:51p                 597 ch2_10.bak
01/15/2003  09:54p                 592 ch2_10.py


What am I doing wrong ?