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


Python argh.ArghParser类代码示例

本文整理汇总了Python中argh.ArghParser的典型用法代码示例。如果您正苦于以下问题:Python ArghParser类的具体用法?Python ArghParser怎么用?Python ArghParser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: main

def main():
    logging_helper.logging_config(detail="high")
    parser = ArghParser()
    parser.add_commands([
        remove_missing_seqs
        ]
        )
    parser.dispatch()
开发者ID:andreyto,项目名称:YAP,代码行数:8,代码来源:mothur_edit.py

示例2: main

def main():
    logging_config(detail="high")
    parser = ArghParser(description="Utilities for manipulating FASTA files")
    parser.add_commands([
        rec_filter
        ]
        )
    parser.dispatch()
开发者ID:andreyto,项目名称:mgtaxa,代码行数:8,代码来源:fasta_util.py

示例3: main

def main():
    """Use argh to dispatch to your subcommands."""
    from argh import ArghParser  # sudo apt-get install python3-argh
    parser = ArghParser()
    # Sorting makes the output of --help better:
    parser.add_commands(sorted(subcommand.s, key=lambda f: f.__name__))
    # parser.add_commands(subcommand.s)
    parser.dispatch()
开发者ID:nandoflorestan,项目名称:bag,代码行数:8,代码来源:subcommand.py

示例4: main

def main():
    logging_config(detail="high")
    parser = ArghParser(description="Utilities for working with tabular files")
    parser.add_commands([
        filter_rows
        ]
        )
    parser.dispatch()
开发者ID:andreyto,项目名称:mgtaxa,代码行数:8,代码来源:tab_util.py

示例5: main

def main(argv=None):
    """ Main method / entry point """
    if argv is None:
        argv = sys.argv[1:]
    description = "SSL Karttarekisteri KML tool"
    parser = ArghParser(description=description)
    parser.add_commands([convert, download])
    parser.dispatch(argv=argv)
开发者ID:jvtm,项目名称:sslkml,代码行数:8,代码来源:conv.py

示例6: main

def main():
    logging_config(detail="high")
    parser = ArghParser(description="Utilities for analysing output of annotation consensus classifier")
    parser.add_commands([
        as_tab
        ]
        )
    parser.dispatch()
开发者ID:andreyto,项目名称:mgtaxa,代码行数:8,代码来源:annot_cons_util.py

示例7: main

def main():
    from snaptastic import __version__
    if '--version' in sys.argv:
        print 'Snaptastic version %s' % __version__

    p = ArghParser()
    commands = [make_snapshots, mount_snapshots, check_backups,
                list_volumes, unmount_snapshots, clean, test]
    p.add_commands(commands)
    p.dispatch()
开发者ID:mikery,项目名称:Snaptastic,代码行数:10,代码来源:cli.py

示例8: __call__

    def __call__(self, **kwargs):
        parser = ArghParser()
        commands = [
            full_release,
            publish_cfg_files,
            update_distribution_changelog,
        ]

        parser.add_commands(commands)
        parser.dispatch()
开发者ID:derFreitag,项目名称:freitag.releaser,代码行数:10,代码来源:manage.py

示例9: main

def main():
    l18n.init()

    parser = ArghParser()
    parser.add_argument('-a', '--auth',
                        action='store_true',
                        help=_('Authenticate and show all problems'
                               ' on this machine'))

    parser.add_argument('-v', '--version',
                        action='version',
                        version=config.VERSION)

    parser.add_commands([
        backtrace,
        di_install,
        gdb,
        info,
        list_problems,
        remove,
        report,
        retrace,
        status,
    ])

    argcomplete.autocomplete(parser)

    try:
        parser.dispatch()
    except KeyboardInterrupt:
        sys.exit(1)

    sys.exit(0)
开发者ID:abrt,项目名称:abrt,代码行数:33,代码来源:cli.py

示例10: main

def main():
	parser = ArghParser()

	parser.add_commands(
		(
			module_list,
			module_install,
			module_uninstall,
			module_enable,
			module_disable
		),
		namespace='module',
		title='Module commands',
		description='Group of commands related to listing or (un)installing modules'
	)

	ini_file='production.ini'
	if 'NP_INI_FILE' in os.environ:
		ini_file = os.environ['NP_INI_FILE']

	ini_name='netprofile'
	if 'NP_INI_NAME' in os.environ:
		ini_name = os.environ['NP_INI_NAME']

	parser.add_argument('--ini-file', '-i', default=ini_file, help='Specify .ini file to use')
	parser.add_argument('--application', '-a', default=ini_name, help='Default app section of .ini file to use')

	parser.dispatch()
开发者ID:baloon11,项目名称:npui,代码行数:28,代码来源:ctl.py

示例11: __call__

 def __call__(self, **kwargs):
     parser = ArghParser()
     parser.add_commands(
         [checkPypi,
          checkPackageForUpdates,
          checkAllPackagesForUpdates,
          pulls,
          changelog,
          create_launchpad_release,
          check_checkout])
     parser.dispatch()
开发者ID:jfroche,项目名称:esteele.manager,代码行数:11,代码来源:manage.py

示例12: __call__

 def __call__(self, **kwargs):
     parser = ArghParser()
     parser.add_commands(
         [checkPypi,
          checkPackageForUpdates,
          checkAllPackagesForUpdates,
          pulls,
          changelog,
          create_launchpad_release,
          check_checkout,
          append_jenkins_build_number_to_package_version])
     parser.dispatch()
开发者ID:esteele,项目名称:esteele.manager,代码行数:12,代码来源:manage.py

示例13: main

def main():
    """Shell entry point for execution"""
    try:
        argparser = ArghParser()
        argparser.add_commands([
            phase1_install,
            phase2_install,
        ])

        argparser.dispatch()
    except KeyboardInterrupt:
        sys.exit(0)
开发者ID:brint,项目名称:actian-matrix,代码行数:12,代码来源:config.py

示例14: main

def main():
    hc.setup()

    opt = "stdin_buffer_lines"
    buffer = 0
    buffering = False

    #if opt in CONFIG:
    #    buffering = True
    #    buffer = int(CONFIG[opt])

    if not sys.stdin.isatty():
        db = get_database()
        cbuffer = 0
        # FIXME: should handle g-code & stuff
        while True:
            line = sys.stdin.readline()
            if not line:
                break

            path, value = line.split(' ', 1)
            if ' ' in value:  # timestamp present
                dt_in, value = value.split()
                dt = parse_timestamp(dt_in)
            else:
                dt = now()
            #print(o)
            cbuffer += 1

        sys.exit(0)

    #logging.basicConfig(level=logging.DEBUG)
    #logging.getLogger('sqlalchemy.engine').setLevel(logging.INFO)
    logging.basicConfig(level=logging.INFO)

    parser = ArghParser()
    parser.add_commands([
        send,
        shell,
        server,
        monitor,
        uimon,
        uipcb,
        uiprobe,
    ])

    argcomplete.autocomplete(parser)

    try:
        parser.dispatch()
    except KeyboardInterrupt:
        sys.exit(1)
开发者ID:hackerspace,项目名称:hacked_cnc,代码行数:52,代码来源:cli.py

示例15: get_base_parser

def get_base_parser():
    dist = pkg_resources.get_distribution("awstools")
    parser = ArghParser(version=dist.version)
    parser.add_argument(
        '--config',
        default=None,
        help="path of an alternative configuration file")
    parser.add_argument(
        '--settings',
        default=None,
        help="path of the application settings configuration file")

    return parser
开发者ID:pior,项目名称:awstools,代码行数:13,代码来源:__init__.py


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