##// END OF EJS Templates
Merge branch 'newkernel' of git://github.com/ellisonbg/ipython into qtfrontend...
Merge branch 'newkernel' of git://github.com/ellisonbg/ipython into qtfrontend Conflicts: IPython/zmq/pykernel.py

File last commit:

r2756:35f39729
r2777:9b98ba4e merge
Show More
backend_payload.py
23 lines | 622 B | text/x-python | PythonLexer
""" Provides basic funtionality for payload backends.
"""
# Local imports.
from IPython.zmq.kernel import Kernel
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(format=format, data=data, metadata=metadata)
Kernel.get_kernel().add_exec_payload('plot', payload)