##// END OF EJS Templates
Put the whole history interface into kernelmanager.
Put the whole history interface into kernelmanager.

File last commit:

r3602:8554e339
r3819:5be0cc49
Show More
displayhook.py
22 lines | 589 B | text/x-python | PythonLexer
Brian Granger
Separating kernel into smaller pieces.
r2754 import __builtin__
from session import extract_header
class DisplayHook(object):
MinRK
propagate iopub to clients
r3602 topic=None
Brian Granger
Separating kernel into smaller pieces.
r2754 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
MinRK
all sends/recvs now via Session.send/recv....
r3269 msg = self.session.send(self.pub_socket, u'pyout', {u'data':repr(obj)},
MinRK
propagate iopub to clients
r3602 parent=self.parent_header, ident=self.topic)
Brian Granger
Separating kernel into smaller pieces.
r2754
def set_parent(self, parent):
self.parent_header = extract_header(parent)