首页 > 解决方案 > 使用乌龟的python中的警报框

问题描述

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

标签: pythonturtle-graphicspython-turtle

解决方案


尝试这个:

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

推荐阅读