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

Method filename

Tools/gdb/libpython.py:1197–1201  ·  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

1195 return None, None
1196
1197 def filename(self):
1198 '''Get the path of the current Python source file, as a string'''
1199 if self.is_optimized_out():
1200 return FRAME_INFO_OPTIMIZED_OUT
1201 return self.co_filename.proxyval(set())
1202
1203 def current_line_num(self):
1204 '''Get current line number as an integer (1-based)

Callers 3

current_lineMethod · 0.95
filenameMethod · 0.45
invokeMethod · 0.45

Calls 3

is_optimized_outMethod · 0.95
setFunction · 0.85
proxyvalMethod · 0.45

Tested by

no test coverage detected