MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / do_source

Method do_source

tools/python-3.11.9-amd64/Lib/pdb.py:1355–1368  ·  view source on GitHub ↗

source expression Try to get source code for the given object and display it.

(self, arg)

Source from the content-addressed store, hash-verified

1353 do_ll = do_longlist
1354
1355 def do_source(self, arg):
1356 """source expression
1357 Try to get source code for the given object and display it.
1358 """
1359 try:
1360 obj = self._getval(arg)
1361 except:
1362 return
1363 try:
1364 lines, lineno = self._getsourcelines(obj)
1365 except (OSError, TypeError) as err:
1366 self.error(err)
1367 return
1368 self._print_lines(lines, lineno)
1369
1370 complete_source = _complete_expression
1371

Callers

nothing calls this directly

Calls 4

_getvalMethod · 0.95
_getsourcelinesMethod · 0.95
errorMethod · 0.95
_print_linesMethod · 0.95

Tested by

no test coverage detected