Next / Previous / Contents / TCC Help System / NM Tech homepage

4.10. fatal(): Write a message and stop

This function writes a message to the standard error stream and stops execution.

pyrang
def fatal(*L):
    """Write a message and terminate.

      [ L is a list of strings ->
          sys.stderr  +:=  (concatenated elements of L)
          stop execution ]
    """
    print("*** {0}".format(''.join(L)), file=sys.stderr)
    sys.exit(1)