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

Method _close

Lib/idlelib/editor.py:1095–1113  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1093 pass
1094
1095 def _close(self):
1096 if self.io.filename:
1097 self.update_recent_files_list(new_file=self.io.filename)
1098 window.unregister_callback(self.postwindowsmenu)
1099 self.unload_extensions()
1100 self.io.close()
1101 self.io = None
1102 self.undo = None
1103 if self.color:
1104 self.color.close()
1105 self.color = None
1106 self.text = None
1107 self.tkinter_vars = None
1108 self.per.close()
1109 self.per = None
1110 self.top.destroy()
1111 if self.close_hook:
1112 # unless override: unregister from flist, terminate if last window
1113 self.close_hook()
1114
1115 def load_extensions(self):
1116 self.extensions = {}

Callers 3

closeMethod · 0.95
openMethod · 0.95
test_initMethod · 0.95

Calls 6

unload_extensionsMethod · 0.95
close_hookMethod · 0.95
unregister_callbackMethod · 0.80
closeMethod · 0.45
destroyMethod · 0.45

Tested by 1

test_initMethod · 0.76