Message252239
I'm noticing some things on the argparse help output that can maybe enhanced. Here is a testcase that produces an example output:
#!/usr/bin/python3 -BEOObbs
# coding=utf-8
import argparse
arguments = argparse.ArgumentParser()
arguments.add_argument('-t', '--test1', action = 'store_true', help = 'Description1')
arguments.add_argument('--test2', action = 'store_true', help = 'Description2')
arguments.add_argument('-u', '--test3', choices = ['choice1', 'choice2'], help = 'Description3', nargs = '+')
arguments.parse_args()
- A way to automatically indent names or to give the user a way to control the indentation would make them easier to read. For example --test2 is here under a short option but it would be easier to read if it would have an offset to be directly under --test1.
- The line "-u {choice1,choice2} [{choice1,choice2} ...], --test3 {choice1,choice2} [{choice1,choice2} ...]" shows the choices for every name while they are the same. Maybe they can be shortened to be shown only on the last name like "-u, --test3 {choice1,choice2} [{choice1,choice2} ...]". |
|
Date |
User |
Action |
Args |
2015-10-03 20:58:03 | Sworddragon | set | recipients:
+ Sworddragon |
2015-10-03 20:58:03 | Sworddragon | set | messageid: <1443905883.43.0.512702237453.issue25307@psf.upfronthosting.co.za> |
2015-10-03 20:58:03 | Sworddragon | link | issue25307 messages |
2015-10-03 20:58:02 | Sworddragon | create | |
|