[Tutor] Reload() in v3? WAS Re: IDEs
Alan Gauld
alan.gauld at btinternet.com
Sat Nov 27 16:04:57 CET 2010
"Steven D'Aprano" <steve at pearwood.info> wrote
> The other nine times out of ten *wink* I need to do debugging, and I
> swap tabs and work in my interactive Python interpreter.
>
> import filename # first time only
> reload(filename) # all subsequent times
I'm working on the v3 version of my tutor and while testing some
module code I tried to reload the module in IDLE... I got an error:
>>> import os
>>> reload(os)
Traceback (most recent call last):
File "<pyshell#65>", line 1, in <module>
reload(os)
NameError: name 'reload' is not defined
>>>
Has reload been removed in V3?
Whats the alternative? Does a repeated import auto-reload?
I'm surprised and confused...
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list