python gui messagebox

时间:2024-10-04 13:35:20

类似于win32的MessageBox框

//test.py

from Tkinter import *

from tkMessageBox import *

root = Tk()

li = ['C','Python','php','html','sql','java']

movie = ['css','jquery','bootstrap']

list1 = Listbox(root)

list2 = Listbox(root)

for item in li:

list1.insert(0,item)

for item in movie:

list2.insert(0,item)

list1.pack()

list2.pack()

showinfo(message="look at me")

root.mainloop()

//result

python gui messagebox