You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

17 lines
585 B

  1. __author__ = 'Chris'
  2. import argparse
  3. from gooey import Gooey
  4. def main():
  5. parser = argparse.ArgumentParser(description='Process some integers.')
  6. parser.add_argument('integers', metavar='N', type=int, nargs='+',
  7. help='an integer for the accumulator')
  8. parser.add_argument('--sum', dest='accumulate', action='store_const',
  9. const=sum, default=max,
  10. help='sum the integers (default: find the max)')
  11. args = parser.parse_args()
  12. print args.accumulate(args.integers)
  13. if __name__ == '__main__':
  14. main()