##// END OF EJS Templates
Improved the size hint for ConsoleWidget. We now acheive a width of 80 characters, through a mixture of better margin calculation and, well, fudging a little bit.
Improved the size hint for ConsoleWidget. We now acheive a width of 80 characters, through a mixture of better margin calculation and, well, fudging a little bit.

File last commit:

r2827:34964c21
r2882:67290238
Show More
backend_payload.py
26 lines | 740 B | text/x-python | PythonLexer
/ IPython / zmq / pylab / backend_payload.py
epatters
Initial checkin of (not yet working) matplotlib payload backend and associated machinery.
r2756 """ Provides basic funtionality for payload backends.
"""
# Local imports.
Brian Granger
First working draft of new payload system.
r2814 from IPython.core.interactiveshell import InteractiveShell
epatters
Initial checkin of (not yet working) matplotlib payload backend and associated machinery.
r2756
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.
"""
Brian Granger
%edit is now working....
r2827 payload = dict(
source='IPython.zmq.pylab.backend_payload.add_plot_payload',
format=format, data=data, metadata=metadata
)
Brian Granger
First working draft of new payload system.
r2814 InteractiveShell.instance().payload_manager.write_payload(payload)