MCPcopy Index your code
hub / github.com/ipython/ipython / log_output

Method log_output

IPython/core/displayhook.py:250–261  ·  view source on GitHub ↗

Log the output.

(self, format_dict)

Source from the content-addressed store, hash-verified

248 self.exec_result.result = result
249
250 def log_output(self, format_dict):
251 """Log the output."""
252 self.shell.history_manager.outputs[self.prompt_count].append(
253 HistoryOutput(output_type="execute_result", bundle=format_dict)
254 )
255 if "text/plain" not in format_dict:
256 # nothing to do
257 return
258 if self.shell.logger.log_output:
259 self.shell.logger.log_write(format_dict['text/plain'], 'output')
260 self.shell.history_manager.output_hist_reprs[self.prompt_count] = \
261 format_dict['text/plain']
262
263 def finish_displayhook(self):
264 """Finish up all displayhook activities."""

Callers 1

__call__Method · 0.95

Calls 2

HistoryOutputClass · 0.85
log_writeMethod · 0.80

Tested by

no test coverage detected