; > Whats the alternative? Does a repeated import auto-reload?
> >
> > I'm surprised and confused...
>
> Found it, its been moved into the imp module.
>
> You need to import imp and then do
>
> imp.reload(foo)
>
> >>> import os
> >>> re
rt os
>>> reload(os)
Traceback (most recent call last):
File "", line 1, in
reload(os)
NameError: name 'reload' is not defined
>>> import imp
>>> imp.reload(os)
>>>
I wonder why that was considered "a good idea"?
Alan G.
> -Original Message-
> On Sat, 27 Nov 2010 22:00:03 +0800
> Kok Cheng Tan wrote:
>
> > I created this website for practising python online:
> > http://www.pyschools.com. Hope to gather feedback from
> people here who
> > are interesting in teaching and learning python.
>
I logged in
On Sat, 27 Nov 2010 22:00:03 +0800
Kok Cheng Tan wrote:
> I created this website for practising python online:
> http://www.pyschools.com. Hope to gather feedback from people here
> who are interesting in teaching and learning python.
Here you go with the first suggestion: remove the need to log