# -*- coding: utf-8 -*-
# 执行dos命令
import os
class DosCmd:
def excute_cmd_result(self, command):
result_list = []
# popen方式
result = os.popen(command).readlines()
for i in result:
if i == '\n':
continue
result_list.append(i.strip('\n'))
return result_list
# os.system的方式
def excute_cmd(self, command):
os.system(command)
def walle(self):
apk_name = input("输入基础包全称:")
command = "java -jar walle-cli-all.jar batch2 -f config.json " + str(apk_name) + " Results"
self.excute_cmd_result(command)
input("\n\n渠道包已放到Results文件夹下~\n点击任意键退出...")
if __name__ == '__main__':
dos = DosCmd()
dos.walle()