cli.py 文件源码

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

项目:pyorcy 作者: markolopa 项目源码 文件源码
def main():
    parser = create_parser()
    args = parser.parse_args()

    # Arguments that drive the behaviour of pyorcy
    pyorcy.USE_CYTHON = True
    if args.python:
        pyorcy.USE_CYTHON = False
    if args.verbose:
        pyorcy.VERBOSE = True

    # Add the location of the module to the sys.path
    module = args.MODULE[0]
    sys.path.append(os.path.dirname(module))

    # Add remaining parameters in globals
    init_globals = {'__args__': args.mod_args}

    # Execute the module
    runpy.run_path(module, init_globals=init_globals, run_name="__main__")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号