TAGS :Viewed: 8 - Published at: a few seconds ago

[ Relationship / difference between dreload() and autoreload ]

IPython offers something known as deep_reload which is also available as a terminal option that can be activated in ipython_config.py.

There is also the extension auto_reload which could also be activated by default in ipython_config.

What is the difference between them?

Answer 1


  • deepreload: When I ask to deep-reload a, also reload b and c, which a imports, and d, which b imports (and so on).
  • autoreload: Every time I run code, check to see if modules have changed since they were last loaded, and reload any that have changed. This also does some magic so that instances of reloaded classes get the code from the new classes.