MCPcopy Create free account
hub / github.com/RT-Thread/env-windows / show_socket_error

Function show_socket_error

tools/python-3.11.9-amd64/Lib/idlelib/run.py:207–221  ·  view source on GitHub ↗

Display socket error from manage_socket.

(err, address)

Source from the content-addressed store, hash-verified

205 server.handle_request() # A single request only
206
207def show_socket_error(err, address):
208 "Display socket error from manage_socket."
209 import tkinter
210 from tkinter.messagebox import showerror
211 root = tkinter.Tk()
212 fix_scaling(root)
213 root.withdraw()
214 showerror(
215 "Subprocess Connection Error",
216 f"IDLE's subprocess can't connect to {address[0]}:{address[1]}.\n"
217 f"Fatal OSError #{err.errno}: {err.strerror}.\n"
218 "See the 'Startup failure' section of the IDLE doc, online at\n"
219 "https://docs.python.org/3/library/idle.html#startup-failure",
220 parent=root)
221 root.destroy()
222
223
224def 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