{ } Raw JSON

bundles / IPython 9.13.0 / IPython / core / interactiveshell / InteractiveShell / define_macro

function

IPython.core.interactiveshell:InteractiveShell.define_macro

source: /IPython/core/interactiveshell.py :2627

Signature

def   define_macro ( self name themacro )

Summary

Define a new macro

Parameters

name : str

The name of the macro.

themacro : str or Macro

The action to do upon invoking the macro. If a string, a new Macro object is created by passing the string to it.

Aliases

  • IPython.InteractiveShell.define_macro