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

Function show_socket_error

Lib/idlelib/run.py:214–228  ·  view source on GitHub ↗

Display socket error from manage_socket.

(err, address)

Source from the content-addressed store, hash-verified

212 server.handle_request() # A single request only
213
214def show_socket_error(err, address):
215 "Display socket error from manage_socket."
216 import tkinter
217 from tkinter.messagebox import showerror
218 root = tkinter.Tk()
219 fix_scaling(root)
220 root.withdraw()
221 showerror(
222 "Subprocess Connection Error",
223 f"IDLE's subprocess can't connect to {address[0]}:{address[1]}.\n"
224 f"Fatal OSError #{err.errno}: {err.strerror}.\n"
225 "See the 'Startup failure' section of the IDLE doc, online at\n"
226 "https://docs.python.org/3/library/idle.html#startup-failure",
227 parent=root)
228 root.destroy()
229
230
231def get_message_lines(typ, exc, tb):

Callers 1

manage_socketFunction · 0.85

Calls 3

destroyMethod · 0.95
showerrorFunction · 0.90
fix_scalingFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…