我希望此函数在程序中异步运行,问题是我什至不知道我到处都搜索过(我对此很陌生)
url = urlInputMenu.get()
textMenu.insert("end-1c","\n")
for anyreg in choices:
try:
res = dns.resolver.query(url,anyreg)
textMenu.insert("end-1c","\n")
textMenu.insert("end-1c",res.response.answer,"correct")
a = res.response.answer
stringtoFile.append(a)
except:
textMenu.insert("end-1c","\n")
textMenu.insert("end-1c","error geting the {} record ".format(anyreg),"Alert")
continue