
from __future__ import print_function

import sys


def note(message):
    """
    note(message)

    Print a diagnostic notification to the standard output.
    """
    print(sys.argv[0] + ": note: " + message)
    sys.stdout.flush()


def fatal(message):
    """
    fatal(message)

    Raise a fatal error.
    """
    raise SystemExit(sys.argv[0] + ": fatal error: " + message)


from __future__ import print_function

import sys


def note(message):
    """
    note(message)

    Print a diagnostic notification to the standard error stream.
    """
    print(sys.argv[0] + ": note: " + message, file=sys.stderr)
    sys.stderr.flush()


def fatal(message):
    """
    fatal(message)

    Raise a fatal error.
    """
    raise SystemExit(sys.argv[0] + ": fatal error: " + message)

Print build-script notes to stderr
Print build-script notes to stderr

This makes it easier to ignore them programmatically.

  
  from __future__ import print_function
  
  import sys
  
  
  def note(message):
      """
      note(message)
  
-     Print a diagnostic notification to the standard output.
+     Print a diagnostic notification to the standard error stream.
      """
-     print(sys.argv[0] + ": note: " + message)
+     print(sys.argv[0] + ": note: " + message, file=sys.stderr)
-     sys.stdout.flush()
+     sys.stderr.flush()
  
  
  def fatal(message):
      """
      fatal(message)
  
      Raise a fatal error.
      """
      raise SystemExit(sys.argv[0] + ": fatal error: " + message)
  
Print build-script notes to stderr
## Code Before:

from __future__ import print_function

import sys


def note(message):
    """
    note(message)

    Print a diagnostic notification to the standard output.
    """
    print(sys.argv[0] + ": note: " + message)
    sys.stdout.flush()


def fatal(message):
    """
    fatal(message)

    Raise a fatal error.
    """
    raise SystemExit(sys.argv[0] + ": fatal error: " + message)

## Instruction:
Print build-script notes to stderr
## Code After:

from __future__ import print_function

import sys


def note(message):
    """
    note(message)

    Print a diagnostic notification to the standard error stream.
    """
    print(sys.argv[0] + ": note: " + message, file=sys.stderr)
    sys.stderr.flush()


def fatal(message):
    """
    fatal(message)

    Raise a fatal error.
    """
    raise SystemExit(sys.argv[0] + ": fatal error: " + message)
