(
        message, category, filename, lineno, file=None, line=None)
Show Idle-format warning (after replacing warnings.showwarning).

    The differences are the formatter called, the file=None replacement,
    which can be None, the capture of the consequence AttributeError,
    and the output of a hard-coded prompt.
Show Idle-format warning (after replacing warnings.showwarning).
Show Idle - format warning ( after replacing warnings . showwarning ) .
def idle_showwarning(
        message, category, filename, lineno, file=None, line=None):
    """Show Idle-format warning (after replacing warnings.showwarning).

    The differences are the formatter called, the file=None replacement,
    which can be None, the capture of the consequence AttributeError,
    and the output of a hard-coded prompt.
    """
    if file is None:
        file = warning_stream
    try:
        file.write(idle_formatwarning(
                message, category, filename, lineno, line=line))
        file.write(">>> ")
    except (AttributeError, OSError):
        pass
def idle_showwarning ( message , category , filename , lineno , file = None , line = None ) : if file is None : file = warning_stream try : file . write ( idle_formatwarning ( message , category , filename , lineno , line = line ) ) file . write ( ">>> " ) except ( AttributeError , OSError ) : pass