使用乌龟的python中的警报框

问题描述

如何在运行使用海龟图形的程序时显示警告框?我们有 textinput() 但它要求用户输入一些东西,但我只想在那里显示一些文本。海龟图形可以吗?

解决方法

试试这个:

from tkinter import * 
from tkinter import messagebox
  
root = Tk()
  
messagebox.showinfo("showinfo","Information") # The alert.
  
root.mainloop()