This is a development version (9.18.0.dev) and may be unstable.Go to latest (9.17.0)
{ } Raw JSON

bundles / IPython 9.18.0.dev / IPython / core / magic / record_magic

function

IPython.core.magic:record_magic

source: /IPython/core/magic.py:135

Signature

def record_magic(dct: dict[str, dict[str, Any]], magic_kind: _MagicSpec, magic_name: str, func: Any) → None

Summary

Utility function to store a function as a magic of a specific kind.

Parameters

dct : dict

A dictionary with 'line' and 'cell' subdicts.

magic_kind : str

Kind of magic to be stored.

magic_name : str

Key to store the magic as.

func : function

Callable object to store.

Aliases

  • IPython.core.magic.record_magic