binarly_query.py 文件源码

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

项目:binarly-query 作者: binarlyhq 项目源码 文件源码
def main(options):
    if options.pretty_print and not HAS_TABULATE:
        print(Style.BRIGHT + Fore.RED + "Pretty printing requires tabulate python module. (pip install tabulate)")
        return

    init_api(options)
    cmd = options.commands

    switcher = {
        'search': process_search,
        'hunt': process_hunt,
        'sign': process_sign,
        'classify': process_classify,
        'metadata': process_metadata,
        'demo': process_demo
    }

    # Get the function from switcher dictionary
    process_fn = switcher.get(cmd)
    # Execute the function
    return process_fn(options)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号