浅浅更新一下

This commit is contained in:
EillesWan
2022-06-11 13:53:59 +08:00
parent 1fde8ca253
commit 1980aeb8de
12 changed files with 63 additions and 24 deletions

23
作者的自我激励.py Normal file
View File

@ -0,0 +1,23 @@
# -*- conding: utf8 -*-
import os
m = 0
for path, dir_list, file_list in os.walk(r"./"):
for file_name in file_list:
if file_name.endswith('.py'):
file = os.path.join(path, file_name)
print("得到文件名:" + str(file))
for i in open(file, 'r', encoding="utf-8"):
code = i.replace(' ', '').replace('\n', '')
if code.startswith('#'):
continue
if code:
print("\t" + code)
m += 1
else:
pass
input("\n最终代码行数为:" + str(m))