def _show_warning(message, category, filename, lineno, file=None, line=None):
if file is None:<EOL><INDENT>file = sys.stderr<EOL>if file is None:<EOL><INDENT>return<EOL><DEDENT><DEDENT>try:<EOL><INDENT>file.write(formatwarning(message, category, filename, lineno, line))<EOL><DEDENT>except (IOError, UnicodeError):<EOL><INDENT>pass <EOL><DEDENT>
Hook to write a warning to a file; replace if you like.