mirror of
https://github.com/TriM-Organization/Musicreater.git
synced 2025-09-05 20:06:23 +00:00
没有做任何更改,上传一下做备份。
This commit is contained in:
7
查看代码数.py
7
查看代码数.py
@ -12,10 +12,9 @@ for path, dir_list, file_list in os.walk(r"./"):
|
||||
print("得到文件名:" + str(file))
|
||||
for i in open(file, 'r', encoding="utf-8"):
|
||||
code = i.replace(' ', '').replace('\n', '')
|
||||
try:
|
||||
code -= code[code.index('#'):]
|
||||
except:
|
||||
pass
|
||||
|
||||
if code.startswith('#'):
|
||||
continue
|
||||
if code:
|
||||
print("\t" + code)
|
||||
m += 1
|
||||
|
Reference in New Issue
Block a user