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

Function _showwarnmsg_impl

tools/python-3.11.9-amd64/Lib/warnings.py:20–33  ·  view source on GitHub ↗
(msg)

Source from the content-addressed store, hash-verified

18 return _formatwarnmsg_impl(msg)
19
20def _showwarnmsg_impl(msg):
21 file = msg.file
22 if file is None:
23 file = sys.stderr
24 if file is None:
25 # sys.stderr is None when run with pythonw.exe:
26 # warnings get lost
27 return
28 text = _formatwarnmsg(msg)
29 try:
30 file.write(text)
31 except OSError:
32 # the file (probably stderr) is invalid - this warning gets lost.
33 pass
34
35def _formatwarnmsg_impl(msg):
36 category = msg.category.__name__

Callers 2

showwarningFunction · 0.85
_showwarnmsgFunction · 0.85

Calls 2

_formatwarnmsgFunction · 0.85
writeMethod · 0.45

Tested by

no test coverage detected