##// END OF EJS Templates
Provide and easier way to generate magics and pre-post hooks...
Provide and easier way to generate magics and pre-post hooks This introduce a code base way of modifying the ast. This allow to use Template strings with the two special variable names names `__code__` and `__ret__` allowing to quickly write a magic, or hooks that modify the ast. This also introduce a `%code_wrap` cell magic to on the fly wrap code. It is this easy to for example modify IPython to say time each block of code, or retry them, or wrap them in try/except and analyse the error message, profile... Note that this is not new, but simply convenience function and utilities, especially around hygiene.

File last commit:

r27544:96cbe589
r28323:548406db
Show More
__init__.py
11 lines | 409 B | text/x-python | PythonLexer
Brian Granger
Fixed import statements for inputhook.
r2068 # encoding: utf-8
"""
Extra capabilities for IPython
"""
#-----------------------------------------------------------------------------
Matthias BUSSONNIER
update copyright to 2011/20xx-2011...
r5390 # Copyright (C) 2008-2011 The IPython Development Team
Brian Granger
Fixed import statements for inputhook.
r2068 #
# Distributed under the terms of the BSD License. The full license is in
# the file COPYING, distributed as part of this software.
#-----------------------------------------------------------------------------