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)
| 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""" |
nothing calls this directly
no test coverage detected