python2.#与python3.#下tkinter 的simpledialog,messagebox
Posted
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了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)
以上是关于python2.#与python3.#下tkinter 的simpledialog,messagebox的主要内容,如果未能解决你的问题,请参考以下文章
python2.#与python3.#下tkinter 的simpledialog,messagebox
centos7下安装Python3.7(与python2共存)