MCPcopy Create free account
hub / github.com/ipython/ipython / __call__

Method __call__

IPython/core/displayhook.py:252–268  ·  view source on GitHub ↗

Printing with history cache management. This is invoked every time the interpreter needs to print, and is activated by setting the variable sys.displayhook to it.

(self, result=None)

Source from the content-addressed store, hash-verified

250 sys.stdout.flush()
251
252 def __call__(self, result=None):
253 """Printing with history cache management.
254
255 This is invoked every time the interpreter needs to print, and is
256 activated by setting the variable sys.displayhook to it.
257 """
258 self.check_for_underscore()
259 if result is not None and not self.quiet():
260 self.start_displayhook()
261 self.write_output_prompt()
262 format_dict, md_dict = self.compute_format_data(result)
263 self.update_user_ns(result)
264 self.fill_exec_result(result)
265 if format_dict:
266 self.write_format_data(format_dict, md_dict)
267 self.log_output(format_dict)
268 self.finish_displayhook()
269
270 def cull_cache(self):
271 """Output cache is full, cull the oldest entries"""

Callers

nothing calls this directly

Calls 10

check_for_underscoreMethod · 0.95
quietMethod · 0.95
start_displayhookMethod · 0.95
write_output_promptMethod · 0.95
compute_format_dataMethod · 0.95
update_user_nsMethod · 0.95
fill_exec_resultMethod · 0.95
write_format_dataMethod · 0.95
log_outputMethod · 0.95
finish_displayhookMethod · 0.95

Tested by

no test coverage detected