1. 首页
  2. 数据库
  3. 其它
  4. 用于统计项目中代码总行数的Python脚本分享

用于统计项目中代码总行数的Python脚本分享

上传者: 2021-01-30 02:10:01上传 PDF文件 26.41KB 热度 14次
最近需要统计一下项目中代码的总行数,写了一个Python小程序,不得不说Python是多么的简洁,如果用Java写至少是现在代码的2倍。 [code] import os path=”/Users/rony/workspace/ecommerce/ecommerce/hot-deploy/” global totalcount totalcount =0 def cfile (path): allfiles = os.listdir(path) for file in allfiles: child = os.path.join(path,fil
用户评论