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.

19 lines
376 B

2 years ago
  1. from gooey import GooeyParser, Gooey
  2. def main():
  3. parser = GooeyParser()
  4. subs = parser.add_subparsers()
  5. foo = subs.add_parser('foo')
  6. foo.add_argument('a')
  7. foo.add_argument('b')
  8. foo.add_argument('p')
  9. bar = subs.add_parser('bar')
  10. bar.add_argument('a')
  11. bar.add_argument('b')
  12. bar.add_argument('z')
  13. parser.parse_args(['foo'])
  14. main()