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

Method write_output_prompt

IPython/core/displayhook.py:109–119  ·  view source on GitHub ↗

Write the output prompt. The default implementation simply writes the prompt to ``sys.stdout``.

(self)

Source from the content-addressed store, hash-verified

107 pass
108
109 def write_output_prompt(self):
110 """Write the output prompt.
111
112 The default implementation simply writes the prompt to
113 ``sys.stdout``.
114 """
115 # Use write, not print which adds an extra space.
116 sys.stdout.write(self.shell.separate_out)
117 outprompt = 'Out[{}]: '.format(self.shell.execution_count)
118 if self.do_full_cache:
119 sys.stdout.write(outprompt)
120
121 def compute_format_data(self, result):
122 """Compute format data of the object to be displayed.

Callers 1

__call__Method · 0.95

Calls 2

writeMethod · 0.45
formatMethod · 0.45

Tested by

no test coverage detected