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

Method restore_file_breaks

Lib/idlelib/pyshell.py:266–281  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

264 parent=self.text)
265
266 def restore_file_breaks(self):
267 self.text.update() # this enables setting "BREAK" tags to be visible
268 if self.io is None:
269 # can happen if IDLE closes due to the .update() call
270 return
271 filename = self.io.filename
272 if filename is None:
273 return
274 if os.path.isfile(self.breakpointPath):
275 with open(self.breakpointPath) as fp:
276 lines = fp.readlines()
277 for line in lines:
278 if line.startswith(filename + '='):
279 breakpoint_linenumbers = eval(line[len(filename)+1:])
280 for breakpoint_linenumber in breakpoint_linenumbers:
281 self.set_breakpoint(breakpoint_linenumber)
282
283 def update_breakpoints(self):
284 "Retrieves all the breakpoints in the current window"

Callers 2

filename_changed_hookMethod · 0.95
__init__Method · 0.95

Calls 6

set_breakpointMethod · 0.95
openFunction · 0.50
updateMethod · 0.45
isfileMethod · 0.45
readlinesMethod · 0.45
startswithMethod · 0.45

Tested by

no test coverage detected