Next / Previous / Contents / Shipman's homepage

4.12. message() and fatal(): Error message utilities

litdocbook5
# - - -   m e s s a g e

def message(*L):
    '''Print a message and terminate.

      [ L is a list of strings ->
          sys.stderr  +:=  concatenated elements of L
          stop execution ]
    '''
    print(''.join(L), file=sys.stderr)

# - - -   f a t a l

def fatal(*L):
    '''Print a message and terminate.

      [ L is a list of strings ->
          sys.stderr  +:=  concatenated elements of L
          stop execution ]
    '''
    message(*L)
    sys.exit(1)