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

Method _close

Lib/idlelib/pyshell.py:1115–1129  ·  view source on GitHub ↗

Extend EditorWindow._close(), shut down debugger and execution server

(self)

Source from the content-addressed store, hash-verified

1113 return EditorWindow.close(self)
1114
1115 def _close(self):
1116 "Extend EditorWindow._close(), shut down debugger and execution server"
1117 self.close_debugger()
1118 if use_subprocess:
1119 self.interp.kill_subprocess()
1120 # Restore std streams
1121 sys.stdout = self.save_stdout
1122 sys.stderr = self.save_stderr
1123 sys.stdin = self.save_stdin
1124 # Break cycles
1125 self.interp = None
1126 self.console = None
1127 self.flist.pyshell = None
1128 self.history = None
1129 EditorWindow._close(self)
1130
1131 def ispythonsource(self, filename):
1132 "Override EditorWindow method: never remove the colorizer"

Callers 8

closeMethod · 0.45
_closeMethod · 0.45
test_new_emptyMethod · 0.45
tearDownClassMethod · 0.45
test_initMethod · 0.45
tearDownClassMethod · 0.45
tearDownClassMethod · 0.45
tearDownClassMethod · 0.45

Calls 2

close_debuggerMethod · 0.95
kill_subprocessMethod · 0.80

Tested by 6

test_new_emptyMethod · 0.36
tearDownClassMethod · 0.36
test_initMethod · 0.36
tearDownClassMethod · 0.36
tearDownClassMethod · 0.36
tearDownClassMethod · 0.36