MCPcopy Create free account
hub / github.com/bpython/bpython / getstdout

Method getstdout

bpython/curtsiesfrontend/repl.py:2055–2065  ·  view source on GitHub ↗

Returns a string of the current bpython session, wrapped, WITH prompts.

(self)

Source from the content-addressed store, hash-verified

2053 del self.coderunner.interp.locals["_repl"]
2054
2055 def getstdout(self) -> str:
2056 """
2057 Returns a string of the current bpython session, wrapped, WITH prompts.
2058 """
2059 lines = self.lines_for_display + [self.current_line_formatted]
2060 s = (
2061 "\n".join(x.s if isinstance(x, FmtStr) else x for x in lines)
2062 if lines
2063 else ""
2064 )
2065 return s
2066
2067 def focus_on_subprocess(self, args):
2068 prev_sigwinch_handler = signal.getsignal(signal.SIGWINCH)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected