Message219648
You can specify the 'formatter_class' when creating each subparser:
sp1=sp.add_parser('cmd1', formatter_class = argparse.RawDescriptionHelpFormatter)
The 'add_parser' command is the one that passes a variety of **kwargs to 'ArgumentParser' (or what ever parser creator is being used for the subparsers). 'add_subparsers' is more like a 'add_argument' command, creating a '_SubParsersAction' instance.
Few, if any, attributes of the main parser are propagated to the subparsers. I'd have to study the code more closely, but I think it's just the parser class that is propagated. |
|
Date |
User |
Action |
Args |
2014-06-02 22:35:56 | paul.j3 | set | recipients:
+ paul.j3, Michael.Cohen |
2014-06-02 22:35:56 | paul.j3 | set | messageid: <1401748556.12.0.656165935363.issue21633@psf.upfronthosting.co.za> |
2014-06-02 22:35:56 | paul.j3 | link | issue21633 messages |
2014-06-02 22:35:55 | paul.j3 | create | |
|