(argv)
return opts, args
Parse command-line options.
Parse command-line options.
Parse command - line options .
def ParseOptions(argv):
  """Parse command-line options."""
  parser = optparse.OptionParser(usage='%prog [options]')
  parser.add_option('-D', '--debug', action='store_true', default=False)
  parser.add_option('-F', '--formatted', action='store_true', default=False,
                    help=('Output experiments as one "experiment,status" '
                          'per line'))
  parser.add_option(
      '-e', '--enable', action='store', dest='manually_enable',
      help='Comma-delimited list of experiments to manually enable.')
  parser.add_option(
      '-d', '--disable', action='store', dest='manually_disable',
      help='Comma-delimited list of experiments to manually enable.')
  parser.add_option(
      '-r', '--recommended', action='store', dest='recommended',
      help='Comma-delimited list of experiments to no longer manually manage.')
  opts, args = parser.parse_args(argv)
  return opts, args
def ParseOptions ( argv ) : parser = optparse . OptionParser ( usage = '%prog [options]' ) parser . add_option ( '-D' , '--debug' , action = 'store_true' , default = False ) parser . add_option ( '-F' , '--formatted' , action = 'store_true' , default = False , help = ( 'Output experiments as one "experiment,status" ' 'per line' ) ) parser . add_option ( '-e' , '--enable' , action = 'store' , dest = 'manually_enable' , help = 'Comma-delimited list of experiments to manually enable.' ) parser . add_option ( '-d' , '--disable' , action = 'store' , dest = 'manually_disable' , help = 'Comma-delimited list of experiments to manually enable.' ) parser . add_option ( '-r' , '--recommended' , action = 'store' , dest = 'recommended' , help = 'Comma-delimited list of experiments to no longer manually manage.' ) opts , args = parser . parse_args ( argv ) return opts , args