##// END OF EJS Templates
Merge pull request #1732 from fperez/cellmagics...
Merge pull request #1732 from fperez/cellmagics Refactoring of the magics system and implementation of cell magics. This PR completely refactors the magic system, finally moving the magic objects to standalone, independent objects instead of being the mixin class we'd had since the beginning of IPython. Now, a separate base class is provided in IPython.core.magic.Magics that users can subclass to create their own magics. Decorators are also provided to create magics from simple functions without the need for object orientation. All builtin magics now exist in a few subclasses that group together related functionality, and the new IPython.core.magics package has been created to organize this into smaller files. This cleanup was the last major piece of deep refactoring needed from the original 2001 codebase. Secondly, this PR introduces a new type of magic function, prefixed with `%%` instead of `%`, which operates at the cell level. A cell magic receives two arguments: the line it is called on (like a line magic) and the body of the cell below it. Cell magics are most natural in the notebook, but they also work in the terminal and qt console, with the usual approach of using a blank line to signal cell termination. This PR closes #1611, or IPEP 1, where the design had been discussed.
Fernando Perez -
r7011:61eb2ffe merge
Show More
Name Size Modified Last Commit Author
/ IPython / core
magics
tests
__init__.py Loading ...
alias.py Loading ...
application.py Loading ...
autocall.py Loading ...
builtin_trap.py Loading ...
compilerop.py Loading ...
completer.py Loading ...
completerlib.py Loading ...
crashhandler.py Loading ...
debugger.py Loading ...
display.py Loading ...
display_trap.py Loading ...
displayhook.py Loading ...
displaypub.py Loading ...
error.py Loading ...
excolors.py Loading ...
extensions.py Loading ...
fakemodule.py Loading ...
formatters.py Loading ...
history.py Loading ...
hooks.py Loading ...
inputsplitter.py Loading ...
interactiveshell.py Loading ...
ipapi.py Loading ...
logger.py Loading ...
macro.py Loading ...
magic.py Loading ...
magic_arguments.py Loading ...
oinspect.py Loading ...
page.py Loading ...
payload.py Loading ...
payloadpage.py Loading ...
plugin.py Loading ...
prefilter.py Loading ...
profileapp.py Loading ...
profiledir.py Loading ...
prompts.py Loading ...
pylabtools.py Loading ...
release.py Loading ...
shadowns.py Loading ...
shellapp.py Loading ...
splitinput.py Loading ...
ultratb.py Loading ...
usage.py Loading ...