import tkinter as tk
from tkinter import messagebox
root = tk.Tk()
root.withdraw() # This hides the main window of the gui
messagebox.showinfo("Pay attention", "Something happened!")
在Python 2上:
import Tkinter as tk
import tkMessageBox
root = tk.Tk()
root.withdraw() # This hides the main window of the gui
tkMessageBox.showinfo("Pay attention", "Something happened!")
您可以使用tkinter,它是tkgui工具箱的一个接口。你知道吗
在Python 3上:
在Python 2上:
这将创建一个简单的弹出式警报,并应在Windows上工作。你知道吗
相关问题 更多 >
编程相关推荐