python2.#与python3.#下tkinter 的simpledialog,messagebox
(windows下)python2.x有关Tkinter,simpledialog,messagebox的问题
python3是tkinter,python2中是Tkinter
- #python2下
- from Tkinter import *
- import tkSimpleDialog as dl
- import tkMessageBox as mb
- root=Tk()
- w=Label(root,text="Label Title")
- w.pack()
- mb.showinfo("welcome","Welcome Message")
- guess=dl.askinteger("Number","Enter a number")
- output='This is output message'
- mb.showinfo("Output:",output)