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

Method show_warning

Lib/idlelib/pyshell.py:1400–1406  ·  view source on GitHub ↗
(self, msg)

Source from the content-addressed store, hash-verified

1398 self.io.reset_undo()
1399
1400 def show_warning(self, msg):
1401 width = self.interp.tkconsole.width
1402 wrapper = TextWrapper(width=width, tabsize=8, expand_tabs=True)
1403 wrapped_msg = '\n'.join(wrapper.wrap(msg))
1404 if not wrapped_msg.endswith('\n'):
1405 wrapped_msg += '\n'
1406 self.per.bottom.insert("iomark linestart", wrapped_msg, "stderr")
1407
1408 def resetoutput(self):
1409 source = self.text.get("iomark", "end-1c")

Callers 1

mainFunction · 0.80

Calls 5

wrapMethod · 0.95
TextWrapperClass · 0.90
joinMethod · 0.45
endswithMethod · 0.45
insertMethod · 0.45

Tested by

no test coverage detected