MCPcopy Create free account
hub / github.com/ipython/ipython / init_hooks

Method init_hooks

IPython/core/interactiveshell.py:996–1010  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

994 #-------------------------------------------------------------------------
995
996 def init_hooks(self):
997 # hooks holds pointers used for user-side customizations
998 self.hooks = Struct()
999
1000 self.strdispatchers = {}
1001
1002 # Set all default hooks, defined in the IPython.hooks module.
1003 hooks = IPython.core.hooks
1004 for hook_name in hooks.__all__:
1005 # default hooks have priority 100, i.e. low; user hooks should have
1006 # 0-100 priority
1007 self.set_hook(hook_name,getattr(hooks,hook_name), 100, _warn_deprecated=False)
1008
1009 if self.display_page:
1010 self.set_hook('show_in_pager', page.as_hook(page.display_page), 90)
1011
1012 def set_hook(self,name,hook, priority=50, str_key=None, re_key=None,
1013 _warn_deprecated=True):

Callers 1

__init__Method · 0.95

Calls 2

set_hookMethod · 0.95
StructClass · 0.90

Tested by

no test coverage detected