##// END OF EJS Templates
Small fixes for latex/png printing....
Small fixes for latex/png printing. * Added space after Out[] prompt and before png data to improve look. * Translating "operatorname" to "" when rendering latex using mathtext.

File last commit:

r3269:8c0b3978
r3284:3204f1f2
Show More
displayhook.py
20 lines | 555 B | text/x-python | PythonLexer
import __builtin__
from session import extract_header
class DisplayHook(object):
def __init__(self, session, pub_socket):
self.session = session
self.pub_socket = pub_socket
self.parent_header = {}
def __call__(self, obj):
if obj is None:
return
__builtin__._ = obj
msg = self.session.send(self.pub_socket, u'pyout', {u'data':repr(obj)},
parent=self.parent_header)
def set_parent(self, parent):
self.parent_header = extract_header(parent)