Skip to content

Commit

Permalink
Allow also capture output from SoS cell #32
Browse files Browse the repository at this point in the history
  • Loading branch information
Bo Peng committed Jan 26, 2018
1 parent c85849e commit 3459dbf
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/sos_notebook/kernel.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ def write(self, content):
f'<div class="sos_hint">{content[10:].strip()}</div>').data}
})
else:
if self.name == 'stdout' and self.kernel._capture_result is not None:
self.kernel._capture_result += content
self.kernel.send_response(self.kernel.iopub_socket, 'stream',
{'name': self.name, 'text': content})

Expand Down

0 comments on commit 3459dbf

Please sign in to comment.