Message402607
Hi!
From your description it is not clear how exactly you create your subcommand.
From my experience, it works. Demo:
```
import argparse
parser = argparse.ArgumentParser(description='Process some integers.')
subparsers = parser.add_subparsers()
# create the parser for the "a" command
parser_a = subparsers.add_parser('a', help='a help', description='test me')
parser_a.add_argument('bar', type=int, help='bar help')
print(parser.parse_args())
```
Here's the output of `python script.py a -h`:
```
usage: ex.py a [-h] bar
test me
positional arguments:
bar bar help
options:
-h, --help show this help message and exit
```
Do you have the same setup? Or is there anything else that needs to be fixed? |
|
Date |
User |
Action |
Args |
2021-09-25 07:43:05 | sobolevn | set | recipients:
+ sobolevn, longendu |
2021-09-25 07:43:05 | sobolevn | set | messageid: <1632555785.87.0.145021528065.issue45275@roundup.psfhosted.org> |
2021-09-25 07:43:05 | sobolevn | link | issue45275 messages |
2021-09-25 07:43:05 | sobolevn | create | |
|