Adds the default reference viewer startup options to an
        OptionParser instance `optprs`.
436865
def add_default_options(self, optprs):
        
        optprs.add_option("--bufsize", dest="bufsize", metavar="NUM",
                          type="int", default=10,
                          help="Buffer length to NUM")
        optprs.add_option('-c', "--channels", dest="channels",
                          help="Specify list of channels to create")
        optprs.add_option("--debug", dest="debug", default=False,
                          action="store_true",
                          help="Enter the pdb debugger on main()")
        optprs.add_option("--disable-plugins", dest="disable_plugins",
                          metavar="NAMES",
                          help="Specify plugins that should be disabled")
        optprs.add_option("--display", dest="display", metavar="HOST:N",
                          help="Use X display on HOST:N")
        optprs.add_option("--fitspkg", dest="fitspkg", metavar="NAME",
                          default=None,
                          help="Prefer FITS I/O module NAME")
        optprs.add_option("-g", "--geometry", dest="geometry",
                          default=None, metavar="GEOM",
                          help="X geometry for initial size and placement")
        optprs.add_option("--modules", dest="modules", metavar="NAMES",
                          help="Specify additional modules to load")
        optprs.add_option("--norestore", dest="norestore", default=False,
                          action="store_true",
                          help="Don't restore the GUI from a saved layout")
        optprs.add_option("--nosplash", dest="nosplash", default=False,
                          action="store_true",
                          help="Don't display the splash screen")
        optprs.add_option("--numthreads", dest="numthreads", type="int",
                          default=30, metavar="NUM",
                          help="Start NUM threads in thread pool")
        optprs.add_option("--opencv", dest="opencv", default=False,
                          action="store_true",
                          help="Use OpenCv acceleration")
        optprs.add_option("--opencl", dest="opencl", default=False,
                          action="store_true",
                          help="Use OpenCL acceleration")
        optprs.add_option("--plugins", dest="plugins", metavar="NAMES",
                          help="Specify additional plugins to load")
        optprs.add_option("--profile", dest="profile", action="store_true",
                          default=False,
                          help="Run the profiler on main()")
        optprs.add_option("--sep", dest="separate_channels", default=False,
                          action="store_true",
                          help="Load files in separate channels")
        optprs.add_option("-t", "--toolkit", dest="toolkit", metavar="NAME",
                          default=None,
                          help="Prefer GUI toolkit (gtk|qt)")
        optprs.add_option("--wcspkg", dest="wcspkg", metavar="NAME",
                          default=None,
                          help="Prefer WCS module NAME")
        log.addlogopts(optprs)
1189774
def add_general_report_optgroup(parser):
    

    g = parser.add_argument_group("Reporting Options")

    g.add_argument("--report-dir", action="store", default=None)

    g.add_argument("--report", action=_opt_cb_report,
                   help="comma-separated list of report formats")
631784
def add_opt(self, opt, value=None):
        
        if value is None:
            self.common_options += [opt]
        else:
            self.common_options += [opt, value]
917486
def add_option(self, parser):
        

        group = parser.add_argument_group(self.name)
        for stat in self.stats:
            stat.add_option(group)

        group.add_argument(
            "--{0}".format(self.option), action="store_true", help="All above")
493969
def addFASTACommandLineOptions(parser):
    

    parser.add_argument(
        '--fastaFile', type=open, default=sys.stdin, metavar='FILENAME',
        help=('The name of the FASTA input file. Standard input will be read '
              'if no file name is given.'))

    parser.add_argument(
        '--readClass', default='DNARead', choices=readClassNameToClass,
        metavar='CLASSNAME',
        help=('If specified, give the type of the reads in the input. '
              'Possible choices: %s.' % ', '.join(readClassNameToClass)))

    # A mutually exclusive group for either --fasta, --fastq, or --fasta-ss
    group = parser.add_mutually_exclusive_group()

    group.add_argument(
        '--fasta', default=False, action='store_true',
        help=('If specified, input will be treated as FASTA. This is the '
              'default.'))

    group.add_argument(
        '--fastq', default=False, action='store_true',
        help='If specified, input will be treated as FASTQ.')

    group.add_argument(
        '--fasta-ss', dest='fasta_ss', default=False, action='store_true',
        help=('If specified, input will be treated as PDB FASTA '
              '(i.e., regular FASTA with each sequence followed by its '
              'structure).'))
306002
private void addDefaultParsers() {
		parsers = new ArrayList<IParser>();
		parsers.add(new GeldKarteParser(this));
		parsers.add(new EmvParser(this));
	}
13670
def MakeParser(prog):
  

  def AddStandardOptions(parser, *args):
    """Add common endpoints options to a parser.

    Args:
      parser: The parser to add options to.
      *args: A list of option names to add. Possible names are: application,
        format, output, language, service, and discovery_doc.
    """
    if 'application' in args:
      parser.add_argument('-a', '--application', default='.',
                          help='The path to the Python App Engine App')
    if 'format' in args:
      # This used to be a valid option, allowing the user to select 'rest' or 'rpc',
      # but now 'rest' is the only valid type. The argument remains so scripts using it
      # won't break.
      parser.add_argument('-f', '--format', default='rest',
                          choices=['rest'],
                          help='The requested API protocol type (ignored)')
    if 'hostname' in args:
      help_text = ('Default application hostname, if none is specified '
                   'for API service.')
      parser.add_argument('--hostname', help=help_text)
    if 'output' in args:
      parser.add_argument('-o', '--output', default='.',
                          help='The directory to store output files')
    if 'language' in args:
      parser.add_argument('language',
                          help='The target output programming language')
    if 'service' in args:
      parser.add_argument('service', nargs='+',
                          help='Fully qualified service class name')
    if 'discovery_doc' in args:
      parser.add_argument('discovery_doc', nargs=1,
                          help='Path to the discovery document')
    if 'build_system' in args:
      parser.add_argument('-bs', '--build_system', default='default',
                          help='The target build system')

  parser = _EndpointsParser(prog=prog)
  subparsers = parser.add_subparsers(
      title='subcommands', metavar='{%s}' % ', '.join(_VISIBLE_COMMANDS))

  get_client_lib = subparsers.add_parser(
      'get_client_lib', help=('Generates discovery documents and client '
                              'libraries from service classes'))
  get_client_lib.set_defaults(callback=_GetClientLibCallback)
  AddStandardOptions(get_client_lib, 'application', 'hostname', 'output',
                     'language', 'service', 'build_system')

  get_discovery_doc = subparsers.add_parser(
      'get_discovery_doc',
      help='Generates discovery documents from service classes')
  get_discovery_doc.set_defaults(callback=_GenDiscoveryDocCallback)
  AddStandardOptions(get_discovery_doc, 'application', 'format', 'hostname',
                     'output', 'service')

  get_openapi_spec = subparsers.add_parser(
      'get_openapi_spec',
      help='Generates OpenAPI (Swagger) specs from service classes')
  get_openapi_spec.set_defaults(callback=_GenOpenApiSpecCallback)
  AddStandardOptions(get_openapi_spec, 'application', 'hostname', 'output',
                     'service')
  get_openapi_spec.add_argument('--x-google-api-name', action='store_true',
                                help="Add the 'x-google-api-name' field to the generated spec")

  # Create an alias for get_openapi_spec called get_swagger_spec to support
  # the old-style naming. This won't be a visible command, but it will still
  # function to support legacy scripts.
  get_swagger_spec = subparsers.add_parser(
      'get_swagger_spec',
      help='Generates OpenAPI (Swagger) specs from service classes')
  get_swagger_spec.set_defaults(callback=_GenOpenApiSpecCallback)
  AddStandardOptions(get_swagger_spec, 'application', 'hostname', 'output',
                     'service')

  # By removing the help attribute, the following three actions won't be
  # displayed in usage message
  gen_api_config = subparsers.add_parser('gen_api_config')
  gen_api_config.set_defaults(callback=_GenApiConfigCallback)
  AddStandardOptions(gen_api_config, 'application', 'hostname', 'output',
                     'service')

  gen_discovery_doc = subparsers.add_parser('gen_discovery_doc')
  gen_discovery_doc.set_defaults(callback=_GenDiscoveryDocCallback)
  AddStandardOptions(gen_discovery_doc, 'application', 'format', 'hostname',
                     'output', 'service')

  gen_client_lib = subparsers.add_parser('gen_client_lib')
  gen_client_lib.set_defaults(callback=_GenClientLibCallback)
  AddStandardOptions(gen_client_lib, 'output', 'language', 'discovery_doc',
                     'build_system')

  return parser
1165746
def __add_options(parser):
    
    parser.add_option('--upx-dir', default=None,
                      help='Directory containing UPX.')
    parser.add_option('-C', '--configfile',
                      default=DEFAULT_CONFIGFILE,
                      dest='configfilename',
                      help='Name of generated configfile (default: %default)')
1271141
def add_config_option(self, default=None):
        

        self.argparser.add_argument('--config', default=default, help='Config file to read. Defaults to: %(default)s')
        self.should_parse_config = True
145694
def add_input_opt(self, opt, inp):
        
        self.add_opt(opt, inp._dax_repr())
        self._add_input(inp)
599093
def add_parser_arguments():
    """"""
    argparser = parser.get()
    argparser.add_argument('-P', '--profile',
                           action='store',
                           default=None,
                           dest='profile',
                           help='Profile the consumer modules, specifying '
                           'the output directory.')
    argparser.add_argument('-o', '--only',
                           action='store',
                           default=None,
                           dest='consumer',
                           help='Only run the consumer specified')
    argparser.add_argument('-p', '--prepend-path',
                           action='store',
                           default=None,
                           dest='prepend_path',
                           help='Prepend the python path with the value.')
    argparser.add_argument('-q', '--qty',
                           action='store',
                           type=int,
                           default=None,
                           dest='quantity',
                           help='Run the specified quantity of consumer '
                           'processes when used in conjunction with -o')
    argparser.add_argument('--version', action='version',
                           version='%(prog)s {}'.format(__version__))
1055078
def option_parser():
    
    defaults = dict(template_paths=[], contexts=[], schema=None, output='-',
                    engine=None, list_engines=False, verbose=1)

    psr = argparse.ArgumentParser()
    psr.set_defaults(**defaults)

    psr.add_argument("template", type=str, nargs="?",
                     help="Template file path")
    psr.add_argument("-T", "--template-path", action="append",
                     dest="template_paths",
                     help="Template search path can be specified multiple "
                          "times. Note: Dir in which given template exists is "
                          "always included in the search paths (at the end of "
                          "the path list) regardless of this option. ")
    psr.add_argument("-C", "--context", action="append", dest="contexts",
                     help="Specify file path and optionally its filetype, to "
                          "provides context data to instantiate templates. "
                          " The option argument's format is "
                          " [type:]<file_name_or_path_or_glob_pattern>"
                          " ex. -C json:common.json -C ./specific.yaml -C "
                          "yaml:test.dat, -C yaml:/etc/foo.d/*.conf")
    psr.add_argument("-s", "--schema",
                     help="JSON schema file in any formats anyconfig "
                          "supports, to validate context files")
    psr.add_argument("-E", "--engine",
                     help="Specify template engine name such as 'jinja2'")
    psr.add_argument("-L", "--list-engines", action="store_true",
                     help="List supported template engines in your "
                          "environment")
    psr.add_argument("-o", "--output", help="Output filename [stdout]")
    psr.add_argument("-v", "--verbose", action="store_const", const=0,
                     help="Verbose mode")
    psr.add_argument("-q", "--quiet", action="store_const", const=2,
                     dest="verbose", help="Quiet mode")
    return psr
464922
def options(self, parser, env=os.environ):
        
        # pylint:disable=dangerous-default-value
        super(FlakyPlugin, self).options(parser, env=env)
        self.add_report_option(parser.add_option)
        group = OptionGroup(
            parser, "Force flaky", "Force all tests to be flaky.")
        self.add_force_flaky_options(group.add_option)
        parser.add_option_group(group)
1341587
def add_options(cls, parser):
        
        kwargs = {'action': 'store', 'default': '', 'parse_from_config': True,
                  'comma_separated_list': True}
        for num in range(cls.min_check, cls.max_check):
            parser.add_option(None, "--filename_check{}".format(num), **kwargs)
225999
private void installDefaults() {
        // Basic
        setFont(UIManager.getFont("InternalFrame.titleFont"));
        closeButtonToolTip   = UIManager.getString("InternalFrame.closeButtonToolTip");
        iconButtonToolTip    = UIManager.getString("InternalFrame.iconButtonToolTip");
        restoreButtonToolTip = UIManager.getString("InternalFrame.restoreButtonToolTip");
        maxButtonToolTip     = UIManager.getString("InternalFrame.maxButtonToolTip");

        // Synth
        updateStyle(this);
    }
888928
def addContinuousSearchOptions(parser):
    
    addContinuousSetIdArgument(parser)
    addContinuousReferenceNameArgument(parser)
    addStartArgument(parser)
    addEndArgument(parser)
69436
def handle_default_options(options):
    
    if options.settings:
        #Set the percept_settings_module (picked up by settings in conf.base)
        os.environ['PERCEPT_SETTINGS_MODULE'] = options.settings
    if options.pythonpath:
        #Append the pythonpath and the directory one up from the pythonpath to sys.path for importing

        options.pythonpath = os.path.abspath(os.path.expanduser(options.pythonpath))
        up_one_path = os.path.abspath(os.path.join(options.pythonpath, ".."))
        sys.path.append(options.pythonpath)
        sys.path.append(up_one_path)
    return options