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

Method __call__

IPython/core/displayhook.py:269–285  ·  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

267 self._is_active = False
268
269 def __call__(self, result=None):
270 """Printing with history cache management.
271
272 This is invoked every time the interpreter needs to print, and is
273 activated by setting the variable sys.displayhook to it.
274 """
275 self.check_for_underscore()
276 if result is not None and not self.quiet():
277 self.start_displayhook()
278 self.write_output_prompt()
279 format_dict, md_dict = self.compute_format_data(result)
280 self.update_user_ns(result)
281 self.fill_exec_result(result)
282 if format_dict:
283 self.write_format_data(format_dict, md_dict)
284 self.log_output(format_dict)
285 self.finish_displayhook()
286
287 def cull_cache(self):
288 """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