def usage(msg=None):
 global __doc__
 if (msg is not None):
  print >>sys.stderr, msg
 print >>sys.stderr, (__doc__ % dict(PROG_NAME=PROG_NAME))
 sys.exit(1)

def usage ( msg = None ) : global __doc__ if ( msg is not None ) : print >> sys . stderr , msg print >> sys . stderr , ( __doc__ % dict ( PROG_NAME = PROG_NAME ) ) sys . exit ( 1 )
prints the usage .