{ } Raw JSON

bundles / IPython 9.17.0 / IPython / lib / deepreload / reload

function

IPython.lib.deepreload:reload

source: /dev/ipython/IPython/lib/deepreload.py:284

Signature

def reload(module, exclude = ('_abc', '_ast', '_codecs', '_collections', '_contextvars', '_datetime', '_functools', '_imp', '_io', '_locale', '_opcode', '_operator', '_signal', '_sre', '_stat', '_string', '_suggestions', '_symtable', '_sysconfig', '_thread', '_tokenize', '_tracemalloc', '_types', '_typing', '_warnings', '_weakref', 'atexit', 'builtins', 'errno', 'faulthandler', 'gc', 'itertools', 'marshal', 'posix', 'pwd', 'sys', 'time', 'sys', 'os.path', 'builtins', '__main__', 'numpy', 'numpy._globals'))

Summary

Recursively reload all modules used in the given module. Optionally takes a list of modules to exclude from reloading. The default exclude list contains modules listed in sys.builtin_module_names with additional sys, os.path, builtins and __main__, to prevent, e.g., resetting display, exception, and io hooks.

Aliases

  • IPython.lib.deepreload.reload