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

Method register_magic_function

IPython/core/interactiveshell.py:2281–2283  ·  view source on GitHub ↗
(self, func, magic_kind='line', magic_name=None)

Source from the content-addressed store, hash-verified

2279 # Defined here so that it's included in the documentation
2280 @functools.wraps(magic.MagicsManager.register_function)
2281 def register_magic_function(self, func, magic_kind='line', magic_name=None):
2282 self.magics_manager.register_function(func,
2283 magic_kind=magic_kind, magic_name=magic_name)
2284
2285 def run_line_magic(self, magic_name, line, _stack_depth=1):
2286 """Execute the given line magic.

Callers 5

magic_decoFunction · 0.80
markFunction · 0.80
test_magic_error_statusFunction · 0.80
test_cell_magic_regMethod · 0.80
test_prefilter_shadowedFunction · 0.80

Calls 1

register_functionMethod · 0.80

Tested by 3

test_magic_error_statusFunction · 0.64
test_cell_magic_regMethod · 0.64
test_prefilter_shadowedFunction · 0.64