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

Method get_current_block

bpython/curtsiesfrontend/repl.py:1362–1366  ·  view source on GitHub ↗

Returns the current code block as string (without prompts)

(self)

Source from the content-addressed store, hash-verified

1360 self.cursor_offset = len(self.current_line)
1361
1362 def get_current_block(self):
1363 """
1364 Returns the current code block as string (without prompts)
1365 """
1366 return "\n".join(self.buffer + [self.current_line])
1367
1368 def send_to_stdouterr(self, output):
1369 """Send unicode strings or FmtStr to Repl stdout or stderr

Calls

no outgoing calls

Tested by

no test coverage detected