Author talkless
Recipients bethard, louielu, paul.j3, pitrou, talkless, wolma
Date 2017-12-06.09:07:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1512551223.65.0.213398074469.issue18943@psf.upfronthosting.co.za>
In-reply-to
Content
Any progress with this? I believe it would fix my use case:

```
import argparse
import pprint

parser = argparse.ArgumentParser()
group = parser.add_mutually_exclusive_group(required=True)

group.add_argument('--device-get-capabilities',
                   action='store_true',
                   help='Execute GetCapabilities action from ONVIF devicemgmt.wsdl')

group.add_argument('--ptz-absolute-move',
                   nargs=3,
                   metavar=('x', 'y', 'z'),
                   help='Execute AbsoluteMove action from ONVIF ptz.wsdl')

group.add_argument('--ptz-get-status',
                   metavar='MEDIA_PROFILE',
                   default='MediaProfile000',
                   help='Execute GetSatus action from ONVIF ptz.wsdl for a media profile (default=%(default)s)')

pprint.pprint(parser.parse_args(['--ptz-get-status']))
```

Outputs (using 3.6.3):

```
 python3 ./test-ex-group-with-defult.py 
usage: test-ex-group-with-defult.py [-h]
                                    (--device-get-capabilities | --ptz-absolute-move x y z | --ptz-get-status MEDIA_PROFILE)
test-ex-group-with-defult.py: error: argument --ptz-get-status: expected one argument
```

Are there know workarounds for this?
History
Date User Action Args
2017-12-06 09:07:03talklesssetrecipients: + talkless, pitrou, bethard, paul.j3, wolma, louielu
2017-12-06 09:07:03talklesssetmessageid: <1512551223.65.0.213398074469.issue18943@psf.upfronthosting.co.za>
2017-12-06 09:07:03talklesslinkissue18943 messages
2017-12-06 09:07:03talklesscreate