-
Notifications
You must be signed in to change notification settings - Fork 1.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable autoreload in interactive mode #41
Comments
@dbieber - I wonder if this requires loading the module as |
@gpleiss You can enable autoreload in the usual way after entering interactive mode:
This will successfully enable autoreload for everything that was imported, but it won't autoreload things in the One workaround is to move fire.Fire() to a separate file where you import the things you care about, so that everything you might change is being imported and will be reloaded. I wonder if there's a way to make autoreload think that things from the If you're interested in exploring this, the place to start is @jtratner can you elaborate? |
Cool thanks! The separate file solution is a good workaround. I'll explore the |
Thought I'd share some of my (failed) experimentation: I modified interact.py adding the following methods:
Overwriting reload:
And modifying this method:
I also updated autoreload.py (around line 375) to preserve
Also tried adding this to autoreload after the call to reload(module).
No luck. autoreload's update_generic is being called on the objects we want to reload, so not sure what the problem is at the moment. Going to take a break from digging now. Maybe someone will find this useful. |
Is there a way to enable IPython autoreload when using
--interactive
mode? I've been using this mode frequently in development, and it'd be nice to easily test changes on the fly.The text was updated successfully, but these errors were encountered: