def custom_showwarning(<EOL>message, category, filename="<STR_LIT>", lineno=-<NUM_LIT:1>, file=None, line=None<EOL>):
if file is None:<EOL><INDENT>file = sys.stderr<EOL>if file is None:<EOL><INDENT>return<EOL><DEDENT><DEDENT>text = "<STR_LIT>" % (category.__name__, message)<EOL>try:<EOL><INDENT>file.write(text)<EOL><DEDENT>except OSError:<EOL><INDENT>pass<EOL><DEDENT>
Hook to override default showwarning.

    https://stackoverflow.com/questions/2187269/python-print-only-the-message-on-warnings