1 2 3 4 5 6 7 8 9 10 11
import sys import argparse class ArgumentParser(argparse.ArgumentParser): """Our own version of argparse's ArgumentParser""" def error(self, message): sys.stderr.write('ERROR: %s\n' % message) self.print_help() sys.exit(2)