Although IPython comes with a wide variety of magic commands, there are cases where we need to implement custom functionality in a new magic command. In this recipe, we will show how to create line and magic cells, and how to integrate them in an IPython extension.
In : from IPython.core.magic import (register_line_magic, register_cell_magic)
%-prefixed name). The name of this function is the name of the magic. Then, we decorate this function with
In : @register_line_magic ...