generate_scripts.py 文件源码

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

项目:envoy-perf 作者: envoyproxy 项目源码 文件源码
def main():
  parser = argparse.ArgumentParser(
      formatter_class=argparse.ArgumentDefaultsHelpFormatter)
  parser.add_argument("template_dir",
                      help="the absolute path to the template directory")
  parser.add_argument("username",
                      help="your username on the VM in the cloud-platform")

  args = parser.parse_args()

  j2_env = Environment(loader=FileSystemLoader(args.template_dir),
                       trim_blocks=True)

  with open("Makefile", "w") as f:
    f.write(j2_env.get_template("Makefile.template").render(
        username=str(args.username)))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号