MCPcopy Index your code
hub / github.com/python/cpython / show_source

Method show_source

Lib/idlelib/debugger.py:496–505  ·  view source on GitHub ↗
(self, index)

Source from the content-addressed store, hash-verified

494 self.gui.show_frame(self.stack[index])
495
496 def show_source(self, index):
497 if not (0 <= index < len(self.stack)):
498 return
499 frame, lineno = self.stack[index]
500 code = frame.f_code
501 filename = code.co_filename
502 if os.path.isfile(filename):
503 edit = self.flist.open(filename)
504 if edit:
505 edit.gotoline(lineno)
506
507
508class NamespaceViewer:

Callers 2

on_doubleMethod · 0.95
goto_source_lineMethod · 0.95

Calls 3

gotolineMethod · 0.80
isfileMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected