__init__.py 文件源码

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

项目:confu 作者: Maratyszcza 项目源码 文件源码
def standard_parser(description="Confu configuration script"):
    import argparse

    from os import linesep
    from confu.platform import host, possible_targets

    parser = argparse.ArgumentParser(description=description,
        formatter_class=argparse.RawTextHelpFormatter)
    parser.add_argument("--target", dest="target", metavar="PLATFORM", type=Platform,
        default=host.name,
        help="platform where the code will run. Potential options:" + linesep +
            "    " + host.name + " (default)" + linesep +
            linesep.join("    " + target for target in possible_targets[1:]))
    parser.add_argument("--toolchain", dest="toolchain", metavar="TOOLCHAIN",
        choices=["auto", "gnu", "clang"], default="auto",
        help="toolchain to use for compilation. Potential options:" + linesep +
            linesep.join("    " + name for name in ["auto (default)", "gnu", "clang"]))



    return parser
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号