Python dateutil.parser.add_mutually_exclusive_group() Examples
The following are 2
code examples of dateutil.parser.add_mutually_exclusive_group().
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 also want to check out all available functions/classes of the module
dateutil.parser
, or try the search function
.
Example #1
Source File: session.py From mlbstreamer with GNU General Public License v2.0 | 5 votes |
def main(): from . import state from . import utils import argparse global options parser = argparse.ArgumentParser() group = parser.add_mutually_exclusive_group() group.add_argument("-v", "--verbose", action="count", default=0, help="verbose logging") group.add_argument("-q", "--quiet", action="count", default=0, help="quiet logging") options, args = parser.parse_known_args() utils.setup_logging(options.verbose - options.quiet) # state.session = MLBStreamSession.new() # raise Exception(state.session.token) raise Exception(PROVIDERS) # state.session = NHLStreamSession.new() # raise Exception(state.session.session_key) # schedule = state.session.schedule(game_id=2018020020) # media = self.session.get_epgs(game_id=2018020020) # print(json.dumps(list(media), sort_keys=True, # indent=4, separators=(',', ': ')))
Example #2
Source File: alerts_send_alerts.py From yournextrepresentative with GNU Affero General Public License v3.0 | 5 votes |
def add_arguments(self, parser): group = parser.add_mutually_exclusive_group() group.add_argument( '--hourly', action='store_true', help='Send hourly alerts' ) group.add_argument( '--daily', action='store_true', help='Send daily alerts' )