Python argparse._MutuallyExclusiveGroup() Examples

The following are 2 code examples for showing how to use argparse._MutuallyExclusiveGroup(). These examples are extracted from open source projects. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example.

You may check out the related API usage on the sidebar.

You may also want to check out all available functions/classes of the module argparse , or try the search function .

Example 1
Project: cliff   Author: openstack   File: _argparse.py    License: Apache License 2.0 5 votes vote down vote up
def add_mutually_exclusive_group(self, **kwargs):
        group = _MutuallyExclusiveGroup(self, **kwargs)
        self._mutually_exclusive_groups.append(group)
        return group 
Example 2
Project: Gooey   Author: chriskiehl   File: argparse_to_json.py    License: MIT License 5 votes vote down vote up
def is_mutex(action):
    return isinstance(action, argparse._MutuallyExclusiveGroup)