

def register_ipython_magics():
    from metakernel import IPythonKernel
    from IPython.core.magic import register_line_magic
    kernel = IPythonKernel()
    magic = JigsawMagic(magic)
    kernel.line_magics['jigsaw'] = magic

    @register_line_magic
    def jigsaw(line):
        '\n        Use the Jigsaw code visualizer and generator.\n        '
        kernel.call_magic(('%jigsaw ' + line))

dataset/ETHPy150Open Calysto/metakernel/metakernel/magics/jigsaw_magic.py register_ipython_magics/VarMisuse@33/50 `kernel`->`magic`