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

Method filename

Tools/gdb/libpython.py:1023–1027  ·  view source on GitHub ↗

Get the path of the current Python source file, as a string

(self)

Source from the content-addressed store, hash-verified

1021 return self._frame.get_var_by_name(name)
1022
1023 def filename(self):
1024 '''Get the path of the current Python source file, as a string'''
1025 if self.is_optimized_out():
1026 return FRAME_INFO_OPTIMIZED_OUT
1027 return self._frame.filename()
1028
1029 def current_line_num(self):
1030 '''Get current line number as an integer (1-based)

Callers

nothing calls this directly

Calls 2

is_optimized_outMethod · 0.45
filenameMethod · 0.45

Tested by

no test coverage detected