File tree 2 files changed +15
-4
lines changed
Tools/【实验性工具】/自动化/自动打包所有py文件
2 files changed +15
-4
lines changed Original file line number Diff line number Diff line change 47
47
#Issues36: tag:新功能,优化,需要社区帮助
48
48
#建议添加更新程序
49
49
#描述:在版本信息检测工具检测到新版本后调用更新程序
50
+
51
+ #Issues37: tag:优化,处理中->待发布
52
+ #[实验性]自动打包所有py文件工具可以区分具体找到了多少个py文件与多少个pyw文件
50
53
-->
Original file line number Diff line number Diff line change 7
7
fail = 0
8
8
conutf = 0
9
9
aconut = 0
10
+ pyw_aconut = 0
11
+ py_acount = 0
10
12
11
13
# 文件夹路径
12
14
print ("以下所有路径请不要带引号!" )
18
20
19
21
for root , dirs , files in os .walk (folder_path ):
20
22
for file in files :
21
- if file .endswith ('.py' ) or file .endswith ('.pyw' ):
23
+ if file .endswith ('.py' ):
24
+ file_path = os .path .join (root , file )
25
+ print (Fore .BLUE + f'Found py file: { file_path } ' )
26
+ py_acount = py_acount + 1
27
+ elif file .endswith ('.pyw' ):
22
28
file_path = os .path .join (root , file )
23
- print (Fore .BLUE + f'Found file: { file_path } ' )
24
- aconut = aconut + 1
25
- print (f"一共找到了{ aconut } 个py/pyw文件。" )
29
+ print (Fore .BLUE + f'Found pyw file: { file_path } ' )
30
+ pyw_aconut = pyw_aconut + 1
31
+
32
+ aconut = py_acount + pyw_aconut
33
+ print (f"一共找到了{ aconut } 个py/pyw文件。\n 其中有{ py_acount } 个py文件/{ pyw_aconut } 个pyw文件。" )
26
34
27
35
# 函数:记录日志并添加分隔线
28
36
def log_message (message , log_file , success = True ):
You can’t perform that action at this time.
0 commit comments