Message165248
I have an argument called '--verbose' in the main parser.
Then I add a subparser called 'command', to which I add an argument with the same name '--verbose' (See attached script).
When I process these args, I cannot decide afterwards if the user called 'myscript --verbose command' or 'myscript command --verbose'. I always get the same Namespace object returned from parse_args.
IMHO the Namespace object should also provide informations about the source parser, to make main parser args and subparser args distinguishable. Also if I call 'myscript --verbose command --verbose', I should get both args in the resulting Namespace object. |
|
Date |
User |
Action |
Args |
2012-07-11 11:05:30 | Ingo.Fischer | set | recipients:
+ Ingo.Fischer |
2012-07-11 11:05:30 | Ingo.Fischer | set | messageid: <1342004730.08.0.363281774737.issue15327@psf.upfronthosting.co.za> |
2012-07-11 11:05:29 | Ingo.Fischer | link | issue15327 messages |
2012-07-11 11:05:29 | Ingo.Fischer | create | |
|