Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions ipykernel/zmqshell.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,11 +144,17 @@ def clear_output(self, wait=False):
"""
content = dict(wait=wait)
self._flush_streams()
msg = self.session.msg("clear_output", json_clean(content), parent=self.parent_header)

# see publish() for details on how this works
for hook in self._hooks:
msg = hook(msg)
if msg is None:
return

self.session.send(
self.pub_socket,
"clear_output",
content,
parent=self.parent_header,
msg,
ident=self.topic,
)

Expand Down