Home
last modified time | relevance | path

Searched full:argparse (Results 1 – 25 of 850) sorted by relevance

12345678910>>...34

/third_party/python/Doc/howto/
Dargparse.rst4 Argparse Tutorial
9 .. currentmodule:: argparse
11 This tutorial is intended to be a gentle introduction to :mod:`argparse`, the
19 Note also that :mod:`argparse` is based on :mod:`optparse`,
76 import argparse
77 parser = argparse.ArgumentParser()
102 * The second one starts to display the usefulness of the :mod:`argparse`
116 import argparse
117 parser = argparse.ArgumentParser()
151 * The variable is some form of 'magic' that :mod:`argparse` performs for free
[all …]
/third_party/python/Doc/library/
Dargparse.rst1 :mod:`argparse` --- Parser for command-line options, arguments and sub-commands
4 .. module:: argparse
12 **Source code:** :source:`Lib/argparse.py`
20 :ref:`argparse tutorial <argparse-tutorial>`.
22 The :mod:`argparse` module makes it easy to write user-friendly command-line
23 interfaces. The program defines what arguments it requires, and :mod:`argparse`
24 will figure out how to parse those out of :data:`sys.argv`. The :mod:`argparse`
32 The :mod:`argparse` module's support for command-line interfaces is built
33 around an instance of :class:`argparse.ArgumentParser`. It is a container for
36 parser = argparse.ArgumentParser(
[all …]
Dgetopt.rst16 :mod:`argparse` module instead.
148 and more informative help and error messages by using the :mod:`argparse` module::
150 import argparse
153 parser = argparse.ArgumentParser()
162 Module :mod:`argparse`
/third_party/mindspore/mindspore-src/source/tests/ut/python/ascendc_offline_compile/
Dtest_ascendc_compiler.py4 import argparse
31 …input_args = argparse.Namespace(op_host_path=temp_dir, op_kernel_path=temp_dir, soc_version="ascen…
44 input_args = argparse.Namespace(op_host_path=temp_dir + "/test", op_kernel_path=temp_dir,
61 input_args = argparse.Namespace(op_host_path=temp_dir, op_kernel_path=temp_dir + "/test",
78 …input_args = argparse.Namespace(op_host_path=temp_dir, op_kernel_path=temp_dir, soc_version="ascen…
94 …input_args = argparse.Namespace(op_host_path=temp_dir, op_kernel_path=temp_dir, soc_version="ascen…
110 …input_args = argparse.Namespace(op_host_path=temp_dir, op_kernel_path=temp_dir, soc_version="ascen…
127 …input_args = argparse.Namespace(op_host_path=temp_dir, op_kernel_path=temp_dir, soc_version="ascen…
144 input_args = argparse.Namespace(clear=True, install=True, install_path="/tmp")
173 … input_args = argparse.Namespace(ascend_cann_package_path=temp_dir, soc_version="ascend310p",
[all …]
/third_party/mesa3d/bin/
Dcommit_in_branch.py3 import argparse
8 def print_(args: argparse.Namespace, success: bool, message: str) -> None:
80 raise argparse.ArgumentTypeError('invalid commit identifier: ' + commit)
89 raise argparse.ArgumentTypeError('must be in the form `remote/branch`')
101 raise argparse.ArgumentTypeError('Invalid remote: ' + upstream)
104 raise argparse.ArgumentTypeError('Invalid branch: ' + branch)
110 parser = argparse.ArgumentParser(description="""
Dtoml_lint.py3 import argparse
32 parser = argparse.ArgumentParser()
36 nargs=argparse.ZERO_OR_MORE,
Dgen_calendar_entries_test.py26 import argparse
173 args: gen_calendar_entries.RCArguments = argparse.Namespace()
196 args: gen_calendar_entries.ExtendArguments = argparse.Namespace()
222 args: gen_calendar_entries.ExtendArguments = argparse.Namespace()
248 args: gen_calendar_entries.ExtendArguments = argparse.Namespace()
289 args: gen_calendar_entries.FinalArguments = argparse.Namespace()
305 args: gen_calendar_entries.FinalArguments = argparse.Namespace()
/third_party/skia/tools/
Dembed_resources.py10 import argparse
29 parser = argparse.ArgumentParser(
30 formatter_class=argparse.RawDescriptionHelpFormatter,
40 parser.add_argument('--input', required=True, type=argparse.FileType('rb'),
42 parser.add_argument('--output', required=True, type=argparse.FileType('w'),
/third_party/skia/m133/tools/
Dembed_resources.py10 import argparse
29 parser = argparse.ArgumentParser(
30 formatter_class=argparse.RawDescriptionHelpFormatter,
40 parser.add_argument('--input', required=True, type=argparse.FileType('rb'),
42 parser.add_argument('--output', required=True, type=argparse.FileType('w'),
/third_party/mbedtls/tests/scripts/
Dgenerate_test_cert_macros.py14 import argparse
17 class MacroDefineAction(argparse.Action):
24 raise argparse.ArgumentError(
32 raise argparse.ArgumentTypeError(
50 parser = argparse.ArgumentParser()
Dlist_internal_identifiers.py31 import argparse
36 parser = argparse.ArgumentParser(
37 formatter_class=argparse.RawDescriptionHelpFormatter,
/third_party/python/Lib/test/
Dtest_argparse.py15 import argparse
43 parser = argparse.ArgumentParser()
46 mock.patch('argparse._sys.exit')
51 parser = argparse.ArgumentParser()
60 # argparse uses stderr as a fallback
63 mock.patch('argparse._sys.exit'),
172 class ErrorRaisingArgumentParser(argparse.ArgumentParser):
750 argument_signatures = [Sig('--foo', action=argparse.BooleanOptionalAction)]
762 parser = argparse.ArgumentParser()
764 parser.add_argument('--foo', const=True, action=argparse.BooleanOptionalAction)
[all …]
/third_party/python/Tools/peg_generator/pegen/
Dkeywordgen.py3 import argparse
42 parser = argparse.ArgumentParser(
49 "tokens_file", type=argparse.FileType("r"), help="The file with the token definitions"
53 type=argparse.FileType("w"),
/third_party/rust/rust/tests/ui/regions/
Dregions-glb-free-free.rs1 mod argparse { module
26 let f : argparse::Flag = argparse::flag("flag", "My flag"); in main()
/third_party/grpc/tools/codegen/core/
Dgen_experiments.py25 import argparse
74 """Wrapper for argparse command line arguments handling.
80 Command line arguments namespace built by argparse.ArgumentParser().
82 # formatter_class=argparse.ArgumentDefaultsHelpFormatter is not used here
84 flag_parser = argparse.ArgumentParser()
/third_party/gn/examples/ios/build/config/ios/scripts/
Dgenerate_umbrella_header.py10 import argparse
27 parser = argparse.ArgumentParser(
29 formatter_class=argparse.ArgumentDefaultsHelpFormatter)
Dcompile_storyboard.py9 import argparse
27 parser = argparse.ArgumentParser(
29 formatter_class=argparse.ArgumentDefaultsHelpFormatter)
/third_party/vk-gl-cts/external/vulkan-docs/src/scripts/
DstripAPI.py6 import argparse
11 parser = argparse.ArgumentParser(prog='stripAPI',
12 formatter_class=argparse.RawDescriptionHelpFormatter,
/third_party/vulkan-headers/registry/
DstripAPI.py6 import argparse
11 parser = argparse.ArgumentParser(prog='stripAPI',
12 formatter_class=argparse.RawDescriptionHelpFormatter,
/third_party/python/Tools/wasm/
Dwasm_assets.py12 import argparse
128 def get_builddir(args: argparse.Namespace) -> pathlib.Path:
135 def get_sysconfigdata(args: argparse.Namespace) -> pathlib.Path:
147 args: argparse.Namespace,
173 def detect_extension_modules(args: argparse.Namespace):
207 parser = argparse.ArgumentParser()
/third_party/grpc/src/python/grpcio_tests/tests/fork/
Dclient.py16 import argparse
29 raise argparse.ArgumentTypeError("Only true/false allowed")
31 parser = argparse.ArgumentParser()
/third_party/skia/third_party/externals/sfntly/cpp/tools/
Dclean_fonts_repo.py23 import argparse
29 parser = argparse.ArgumentParser(description="""Remove all files from the
32 argparse.ArgumentDefaultsHelpFormatter)
/third_party/benchmark/tools/
Dcompare.py8 import argparse
9 from argparse import ArgumentParser
97 type=argparse.FileType('r'),
105 type=argparse.FileType('r'),
111 nargs=argparse.REMAINDER,
121 type=argparse.FileType('r'),
141 nargs=argparse.REMAINDER,
152 type=argparse.FileType('r'),
166 type=argparse.FileType('r'),
178 nargs=argparse.REMAINDER,
/third_party/astc-encoder/Test/
Dastc_image_info.py30 import argparse
132 error = argparse.ArgumentTypeError("%s is an invalid location" % value)
156 parser = argparse.ArgumentParser()
172 "images", metavar="image", nargs="+", type=argparse.FileType("r"),
183 "images", metavar="image", nargs="+", type=argparse.FileType("r"),
/third_party/nghttp2/doc/
Dmkapiref.py30 import re, sys, argparse, os.path
313 parser = argparse.ArgumentParser(description="Generate API reference")
316 parser.add_argument('index', type=argparse.FileType('w'),
318 parser.add_argument('macros', type=argparse.FileType('w'),
320 parser.add_argument('enums', type=argparse.FileType('w'),
322 parser.add_argument('types', type=argparse.FileType('w'),
326 parser.add_argument('files', nargs='+', type=argparse.FileType('r'),

12345678910>>...34