MCPcopy Index your code
hub / github.com/bpython/bpython / show_source

Method show_source

bpython/curtsiesfrontend/repl.py:2099–2109  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

2097 self.focus_on_subprocess(command + [tmp.name])
2098
2099 def show_source(self) -> None:
2100 try:
2101 source = self.get_source_of_current_name()
2102 except SourceNotFound as e:
2103 self.status_bar.message(f"{e}")
2104 else:
2105 if self.config.highlight_show_source:
2106 source = pygformat(
2107 Python3Lexer().get_tokens(source), TerminalFormatter()
2108 )
2109 self.pager(source)
2110
2111 def help_text(self) -> str:
2112 return self.version_help_text() + "\n" + self.key_help_text()

Callers 3

process_key_eventMethod · 0.95

Calls 3

pagerMethod · 0.95
messageMethod · 0.45

Tested by 2