def func_download(app):
print('download app:%s',app)
os.system("cd " + test_data_dir + " && rm -f " + app)
os.system("cd " + test_data_dir + " && wget http://75.m2.z0.glb.clodn.com/app/" + app)
def downlod_app():
apps = ['app1.tar.gz', 'app2.tar.gz', 'app3.tar.gz']
threads = []
for app in apps: # 起3个线程下载app
t = threading.Thread(target=func_download, args=(app,))
t.start()
threads.append(t)
for t in threads:
t.join()