paul j3 added the comment:

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.

----------
nosy: +paul.j3

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue21633>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to