+ parser = argparse.ArgumentParser(description=__doc__)
+ parser.add_argument('file', metavar='file', nargs=1,
+ help="image to analyse")
+ parser.add_argument('-w', type=int, default=640,
+ help="scale image to the specified width before analysis")
+ parser.add_argument('-d', '--debug', dest='show_all', action='store_true',
+ help="show every step of the computation")
+ parser.add_argument('-s', '--save', dest='do_something', action='store_const',
+ const=image_save, default=im_debug.show,
+ help="save images instead of displaying them")
+ args = parser.parse_args()
+
+ show_all = args.show_all
+ do_something = args.do_something