You are viewing an older version (9.3.0). Go to latest (9.13.0)
{ } Raw JSON

bundles / IPython 9.3.0 / IPython / core / interactiveshell / InteractiveShell / clear_main_mod_cache

function

IPython.core.interactiveshell:InteractiveShell.clear_main_mod_cache

source: /IPython/core/interactiveshell.py :1133

Signature

def   clear_main_mod_cache ( self )

Summary

Clear the cache of main modules.

Extended Summary

Mainly for use by utilities like %reset.

Examples

In [15]: import IPython In [16]: m = _ip.new_main_mod(IPython.__file__, 'IPython') In [17]: len(_ip._main_mod_cache) > 0 Out[17]: True In [18]: _ip.clear_main_mod_cache() In [19]: len(_ip._main_mod_cache) == 0 Out[19]: True

Aliases

  • IPython.InteractiveShell.clear_main_mod_cache