python-tk-弹框超时自动关闭

import ctypes
# 2000ms后自动关闭
ctypes.windll.user32.MessageBoxTimeoutW(0,'请选择(不理会,则10秒后自动关闭)\n','询问','yes',0,2000)

参考:https://blog.csdn.net/mcw_720624/article/details/125292833