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

Function idle_showwarning_subproc

Lib/idlelib/run.py:64–76  ·  view source on GitHub ↗

Show Idle-format warning after replacing warnings.showwarning. The only difference is the formatter called.

(
        message, category, filename, lineno, file=None, line=None)

Source from the content-addressed store, hash-verified

62 return s
63
64def idle_showwarning_subproc(
65 message, category, filename, lineno, file=None, line=None):
66 """Show Idle-format warning after replacing warnings.showwarning.
67
68 The only difference is the formatter called.
69 """
70 if file is None:
71 file = sys.stderr
72 try:
73 file.write(idle_formatwarning(
74 message, category, filename, lineno, line))
75 except OSError:
76 pass # the file (probably stderr) is invalid - this warning gets lost.
77
78_warnings_showwarning = None
79

Callers

nothing calls this directly

Calls 2

idle_formatwarningFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…