当前位置: 首页>>代码示例>>Python>>正文


Python ModTool.setup_parser方法代码示例

本文整理汇总了Python中modtool_base.ModTool.setup_parser方法的典型用法代码示例。如果您正苦于以下问题:Python ModTool.setup_parser方法的具体用法?Python ModTool.setup_parser怎么用?Python ModTool.setup_parser使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在modtool_base.ModTool的用法示例。


在下文中一共展示了ModTool.setup_parser方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: setup_parser

# 需要导入模块: from modtool_base import ModTool [as 别名]
# 或者: from modtool_base.ModTool import setup_parser [as 别名]
 def setup_parser(self):
     " Initialise the option parser for 'gr_modtool.py newmod' "
     parser = ModTool.setup_parser(self)
     #parser.usage = '%prog rm [options]. \n Call %prog without any options to run it interactively.'
     #ogroup = OptionGroup(parser, "New out-of-tree module options")
     #parser.add_option_group(ogroup)
     return parser
开发者ID:gr-mueller,项目名称:gr-modtool,代码行数:9,代码来源:modtool_newmod.py

示例2: setup_parser

# 需要导入模块: from modtool_base import ModTool [as 别名]
# 或者: from modtool_base.ModTool import setup_parser [as 别名]
 def setup_parser(self):
     parser = ModTool.setup_parser(self)
     ogroup = OptionGroup(parser, "Rename module options")
     ogroup.add_option("-o", "--old-name", type="string", default=None, help="Current name of the block to rename.")
     ogroup.add_option("-u", "--new-name", type="string", default=None, help="New name of the block.")
     parser.add_option_group(ogroup)
     return parser
开发者ID:Andy-Vuong,项目名称:gnuradio,代码行数:9,代码来源:modtool_rename.py

示例3: setup_parser

# 需要导入模块: from modtool_base import ModTool [as 别名]
# 或者: from modtool_base.ModTool import setup_parser [as 别名]
    def setup_parser(self):
        """ Initialise the option parser for 'gr_modtool makexml' """
        parser = ModTool.setup_parser(self)
        parser.usage = """%prog info [options]. \n Call %prog without any options to run it interactively.

        Note: This does not work on Python blocks!
        """
        return parser
开发者ID:mmaroti,项目名称:gnuradio,代码行数:10,代码来源:modtool_makexml.py

示例4: setup_parser

# 需要导入模块: from modtool_base import ModTool [as 别名]
# 或者: from modtool_base.ModTool import setup_parser [as 别名]
 def setup_parser(self):
     " Initialise the option parser for 'gr_modtool newmod' "
     parser = ModTool.setup_parser(self)
     parser.usage = '%prog nm [options]. \n Call %prog without any options to run it interactively.'
     ogroup = OptionGroup(parser, "New out-of-tree module options")
     ogroup.add_option("--srcdir", type="string",
             help="Source directory for the module template.")
     parser.add_option_group(ogroup)
     return parser
开发者ID:232675,项目名称:gnuradio,代码行数:11,代码来源:modtool_newmod.py

示例5: setup_parser

# 需要导入模块: from modtool_base import ModTool [as 别名]
# 或者: from modtool_base.ModTool import setup_parser [as 别名]
 def setup_parser(self):
     " Initialise the option parser for 'gr_modtool.py rm' "
     parser = ModTool.setup_parser(self)
     parser.usage = '%prog rm [options]. \n Call %prog without any options to run it interactively.'
     ogroup = OptionGroup(parser, "Remove module options")
     ogroup.add_option("-p", "--pattern", type="string", default=None,
             help="Filter possible choices for blocks to be deleted.")
     ogroup.add_option("-y", "--yes", action="store_true", default=False,
             help="Answer all questions with 'yes'.")
     parser.add_option_group(ogroup)
     return parser
开发者ID:64BitLong,项目名称:gr-modtool,代码行数:13,代码来源:modtool_rm.py

示例6: setup_parser

# 需要导入模块: from modtool_base import ModTool [as 别名]
# 或者: from modtool_base.ModTool import setup_parser [as 别名]
 def setup_parser(self):
     """ Initialise the option parser for 'gr_modtool info' """
     parser = ModTool.setup_parser(self)
     parser.usage = '%prog info [options]. \n Call %prog without any options to run it interactively.'
     ogroup = OptionGroup(parser, "Info options")
     ogroup.add_option("--python-readable", action="store_true", default=None,
             help="Return the output in a format that's easier to read for Python scripts.")
     ogroup.add_option("--suggested-dirs", default=None, type="string",
             help="Suggest typical include dirs if nothing better can be detected.")
     parser.add_option_group(ogroup)
     return parser
开发者ID:36V3mA21Hz,项目名称:gnuradio,代码行数:13,代码来源:modtool_info.py

示例7: setup_parser

# 需要导入模块: from modtool_base import ModTool [as 别名]
# 或者: from modtool_base.ModTool import setup_parser [as 别名]
 def setup_parser(self):
     parser = ModTool.setup_parser(self)
     parser.usage = '%prog add [options]. \n Call %prog without any options to run it interactively.'
     ogroup = OptionGroup(parser, "Add module options")
     ogroup.add_option("-t", "--block-type", type="choice",
             choices=self._block_types, default=None, help="One of %s." % ', '.join(self._block_types))
     ogroup.add_option("--license-file", type="string", default=None,
             help="File containing the license header for every source code file.")
     ogroup.add_option("--argument-list", type="string", default=None,
             help="The argument list for the constructor and make functions.")
     ogroup.add_option("--add-python-qa", action="store_true", default=None,
             help="If given, Python QA code is automatically added if possible.")
     ogroup.add_option("--add-cpp-qa", action="store_true", default=None,
             help="If given, C++ QA code is automatically added if possible.")
     ogroup.add_option("--skip-cmakefiles", action="store_true", default=False,
             help="If given, only source files are written, but CMakeLists.txt files are left unchanged.")
     parser.add_option_group(ogroup)
     return parser
开发者ID:gr-mueller,项目名称:gr-modtool,代码行数:20,代码来源:modtool_add.py

示例8: setup_parser

# 需要导入模块: from modtool_base import ModTool [as 别名]
# 或者: from modtool_base.ModTool import setup_parser [as 别名]
 def setup_parser(self):
     parser = ModTool.setup_parser(self)
     ogroup = OptionGroup(parser, "Add module options")
     ogroup.add_option("-t", "--block-type", type="choice",
             choices=self._block_types, default=None, help="One of %s." % ', '.join(self._block_types))
     ogroup.add_option("--license-file", type="string", default=None,
             help="File containing the license header for every source code file.")
     ogroup.add_option("--copyright", type="string", default=None,
             help="Name of the copyright holder (you or your company) MUST be a quoted string.")
     ogroup.add_option("--argument-list", type="string", default=None,
             help="The argument list for the constructor and make functions.")
     ogroup.add_option("--add-python-qa", action="store_true", default=None,
             help="If given, Python QA code is automatically added if possible.")
     ogroup.add_option("--add-cpp-qa", action="store_true", default=None,
             help="If given, C++ QA code is automatically added if possible.")
     ogroup.add_option("--skip-cmakefiles", action="store_true", default=False,
             help="If given, only source files are written, but CMakeLists.txt files are left unchanged.")
     ogroup.add_option("-l", "--lang", type="choice", choices=('cpp', 'c++', 'python'),
             default=None, help="Language (cpp or python)")
     parser.add_option_group(ogroup)
     return parser
开发者ID:Andy-Vuong,项目名称:gnuradio,代码行数:23,代码来源:modtool_add.py


注:本文中的modtool_base.ModTool.setup_parser方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。