Show Idle-format warning after replacing warnings.showwarning. The only difference is the formatter called.
(
message, category, filename, lineno, file=None, line=None)
| 62 | return s |
| 63 | |
| 64 | def 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 |
nothing calls this directly
no test coverage detected
searching dependent graphs…