cli.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:rust_pypi_example 作者: mckaymatt 项目源码 文件源码
def main(number=None):
    """Console script for rust_pypi_example
       The console script takes a singe argument, "NUMBER",
       which must be an integer greater than 2. The script calls
       out to a library written in Rust to compute whether the
       intger is a prime number.
       Example:
           rust_pypi_example 13
    """
    if number and number > 2:
        click.echo(True if rust_lib.is_prime(number) else False)
    else:
        click.echo("Please supply an integer argument greater than 2. The "
                   "console script will tell you if it is a prime number")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号