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

Method close

Lib/idlelib/pyshell.py:1100–1113  ·  view source on GitHub ↗

Extend EditorWindow.close()

(self)

Source from the content-addressed store, hash-verified

1098 self.showprompt()
1099
1100 def close(self):
1101 "Extend EditorWindow.close()"
1102 if self.executing:
1103 response = messagebox.askokcancel(
1104 "Kill?",
1105 "Your program is still running!\n Do you want to kill it?",
1106 default="ok",
1107 parent=self.text)
1108 if response is False:
1109 return "cancel"
1110 self.stop_readline()
1111 self.canceled = True
1112 self.closing = True
1113 return EditorWindow.close(self)
1114
1115 def _close(self):
1116 "Extend EditorWindow._close(), shut down debugger and execution server"

Callers 5

beginMethod · 0.95
eof_callbackMethod · 0.95
restart_subprocessMethod · 0.45
kill_subprocessMethod · 0.45
close_debuggerMethod · 0.45

Calls 1

stop_readlineMethod · 0.95

Tested by

no test coverage detected