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

Method write_output_prompt

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

120 return self._is_active
121
122 def write_output_prompt(self):
123 """Write the output prompt.
124
125 The default implementation simply writes the prompt to
126 ``sys.stdout``.
127 """
128 # Use write, not print which adds an extra space.
129 sys.stdout.write(self.shell.separate_out)
130 outprompt = 'Out[{}]: '.format(self.shell.execution_count - 1)
131 if self.do_full_cache:
132 sys.stdout.write(outprompt)
133
134 def compute_format_data(self, result):
135 """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