[IPython-user] Module reload in interactive mode
Ignazio Di Napoli
Thu Feb 12 17:44:09 CST 2009
Thank you all! It works replacing all the "from ... import *" in the
Thank you very much,
On Wed, Feb 11, 2009 at 2:35 AM, Fernando Perez <firstname.lastname@example.org> wrote:
> On Tue, Feb 10, 2009 at 1:54 PM, Robin <email@example.com> wrote:
>> On Tue, Feb 10, 2009 at 9:43 PM, Ignazio Di Napoli <firstname.lastname@example.org> wrote:
>> I think the problem is the use of "from package import *" - I don't
>> think you'll ever get reloading to work properly - especially if using
>> that inside __init__.py (I may be wrong though).
> You are completely correct in 'import *' being the source of the
> problem, and it being discouraged. Having said that, there is a way
> to make it work, and that is to put in your script:
> import foo
> from foo import *
> # rest of script...
> In that case, if you edit foo.py and rerun the script, it will pick up
> the changes correctly.
More information about the IPython-user