def _show_warning(message, category, filename, lineno, file=None, line=None):
 if (file is None):
  file = sys.stderr
 try:
  file.write(formatwarning(message, category, filename, lineno, line))
 except IOError:
  pass

def _show_warning ( message , category , filename , lineno , file = None , line = None ) : if ( file is None ) : file = sys . stderr try : file . write ( formatwarning ( message , category , filename , lineno , line ) ) except IOError : pass
hook to write a warning to a file; replace if you like .