##// END OF EJS Templates
Fixing two minor bugs....
Fixing two minor bugs. * ipapi now returns an InteractiveShell. * Fixes a problem in ultratb so that %debug now works.

File last commit:

r2814:6e6dcc90
r2816:7acd33e4
Show More
backend_payload.py
23 lines | 669 B | text/x-python | PythonLexer
""" Provides basic funtionality for payload backends.
"""
# Local imports.
from IPython.core.interactiveshell import InteractiveShell
def add_plot_payload(format, data, metadata={}):
""" Add a plot payload to the current execution reply.
Parameters:
-----------
format : str
Identifies the format of the plot data.
data : str
The raw plot data.
metadata : dict, optional [default empty]
Allows for specification of additional information about the plot data.
"""
payload = dict(type='plot', format=format, data=data, metadata=metadata)
InteractiveShell.instance().payload_manager.write_payload(payload)