Show More
@@ -53,7 +53,7 b' def from_dict(d):' | |||||
53 | def new_output(output_type=None, output_text=None, output_png=None, |
|
53 | def new_output(output_type=None, output_text=None, output_png=None, | |
54 | output_html=None, output_svg=None, output_latex=None, output_json=None, |
|
54 | output_html=None, output_svg=None, output_latex=None, output_json=None, | |
55 | output_javascript=None, output_jpeg=None, prompt_number=None, |
|
55 | output_javascript=None, output_jpeg=None, prompt_number=None, | |
56 | etype=None, evalue=None, traceback=None): |
|
56 | etype=None, evalue=None, traceback=None, stream=None): | |
57 | """Create a new code cell with input and output""" |
|
57 | """Create a new code cell with input and output""" | |
58 | output = NotebookNode() |
|
58 | output = NotebookNode() | |
59 | if output_type is not None: |
|
59 | if output_type is not None: | |
@@ -89,6 +89,9 b' def new_output(output_type=None, output_text=None, output_png=None,' | |||||
89 | if traceback is not None: |
|
89 | if traceback is not None: | |
90 | output.traceback = [unicode(frame) for frame in list(traceback)] |
|
90 | output.traceback = [unicode(frame) for frame in list(traceback)] | |
91 |
|
91 | |||
|
92 | if output_type == u'stream': | |||
|
93 | output.stream = 'stdout' if stream is None else unicode(stream) | |||
|
94 | ||||
92 | return output |
|
95 | return output | |
93 |
|
96 | |||
94 |
|
97 |
General Comments 0
You need to be logged in to leave comments.
Login now