我的python代码有问题!
main.py
import subprocess as sub
from random import choice
import threading
file_list = ['Ctritical.vbs', 'Exclamation.vbs', 'Information.vbs', 'Question.vbs']
def boom():
file = choice(file_list)
sub.run(['cscript', file])
threads = []
while True:
for _ in range(50):
t = threading.Thread(target=boom())
threads.append(t)
threads[_].start()
sub.run(['taskkill', 'wscript.exe'], shell=True)
它不会创建线程来运行,而是逐条运行