IPython Documentation

Table Of Contents

Previous topic

core.logger

Next topic

core.magic

This Page

core.macro

Module: core.macro

Inheritance diagram for IPython.core.macro:

Support for interactive macros in IPython

Macro

class IPython.core.macro.Macro(code)

Bases: object

Simple class to store the value of macros as strings.

Macro is just a callable that executes a string of IPython input when called.

Args to macro are available in _margv list if you need them.

__init__(code)

store the macro value, as a single string which can be executed