加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
summarize.py 671 Bytes
一键复制 编辑 原始数据 按行查看 历史
Arendelle 提交于 2024-07-26 20:32 . update web.py (3 new api)
# -*- coding: utf-8 -*-
import os
from typing import List
ignores: List[str] = [
#
]
if __name__ == "__main__":
ROOT = os.path.dirname(os.path.abspath(__file__))
len_py_file: int = 0
count_line: int = 0
for root, dirs, files in os.walk(os.path.join(ROOT, "physicsLab")):
dirs.remove("__pycache__")
for file in files:
if file in ignores:
continue
len_py_file += 1
with open(os.path.join(root, file), encoding="utf-8") as f:
count_line += len(f.read().splitlines())
print("lines of physicsLab: ", count_line)
print("amount of python files: ", len_py_file)
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化