[issue17218] support title and description in argparse add_mutually_exclusive_group

2016-09-20 Thread Barry A. Warsaw
Changes by Barry A. Warsaw : -- nosy: +barry ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue17218] support title and description in argparse add_mutually_exclusive_group

2014-04-17 Thread paul j3
paul j3 added the comment: oops - one more glitch (revealed by TestMutuallyExclusiveInGroup): 'add_mutually_exclusive_group' accepts a 'required' argument, but 'add_argument_group' does not. So 'add_titled_mutually_exclusive_group' needs to be changed to temporarily remove that argument (if g

[issue17218] support title and description in argparse add_mutually_exclusive_group

2014-04-17 Thread paul j3
paul j3 added the comment: The idea of nesting a mutually_exclusive_group in a titled argument_group is already present in `test_argparse.py`. class TestMutuallyExclusiveInGroup(MEMixin, TestCase): def get_parser(self, required=None): parser = ErrorRaisingArgumentParser(prog='P

[issue17218] support title and description in argparse add_mutually_exclusive_group

2014-04-16 Thread paul j3
paul j3 added the comment: The attached file implements a solution using a subclassed ArgumentParser and a .add_titled_mutually_exclusive_group method (two versions). I changed the test conditions a bit, removing a blank line, and making the usage 'exclusive'. -- Added file: http://bu

[issue17218] support title and description in argparse add_mutually_exclusive_group

2014-04-16 Thread paul j3
paul j3 added the comment: Using a mutually_exclusive_group is a little more complicated than I implied in the previous post. p=argparse.ArgumentParser() g=p.add_mutually_exclusive_group() # currently the code objects to 'title' and 'description' keywords g.add_argument('--foo')

[issue17218] support title and description in argparse add_mutually_exclusive_group

2014-04-16 Thread paul j3
paul j3 added the comment: While mutually exclusive groups are a subclass of argument groups, they have very different uses. Argument groups are used solely to organize the help section. Groups are not used at all during parsing. 'parse_args' doesn't even pay attention to those 2 default gro

[issue17218] support title and description in argparse add_mutually_exclusive_group

2014-04-14 Thread Tatiana Al-Chueyr
Tatiana Al-Chueyr added the comment: uploading test file -- Added file: http://bugs.python.org/file34845/test_argparse_mutex_with_title.py ___ Python tracker ___

[issue17218] support title and description in argparse add_mutually_exclusive_group

2014-04-14 Thread Tatiana Al-Chueyr
Changes by Tatiana Al-Chueyr : Removed file: http://bugs.python.org/file34844/test_argparse_mutex_with_title.py ___ Python tracker ___ ___ Pyt

[issue17218] support title and description in argparse add_mutually_exclusive_group

2014-04-14 Thread Tatiana Al-Chueyr
Tatiana Al-Chueyr added the comment: My proposal is that both: - add_mutually_exclusive_group() - add_argument_group() print optional arguments in the same way when title and/or description are provided. I've attached a test case of the proposed behavior. Please, let me know if you have any o

[issue17218] support title and description in argparse add_mutually_exclusive_group

2013-02-22 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe : -- nosy: +tshepang ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue17218] support title and description in argparse add_mutually_exclusive_group

2013-02-16 Thread Chris Jerdonek
New submission from Chris Jerdonek: This issue is to add to argparse's add_mutually_exclusive_group() method support for passing a title and description. From the argparse docs: "Note that currently mutually exclusive argument groups do not support the title and description arguments of add_a