https://www.cnblogs.com/sheng-yang/p/10596947.html
# -*- coding: utf-8 -*-
"""
Created on Tue Jul 30 15:30:25 2019
@author: Administrator
"""
import tkinter
import tkinter.messagebox
top = tkinter.Tk()
def hello():
tkinter.messagebox.showinfo("hello Python","welcome here")
b = tkinter.Button(top, text = "click me", command = hello)
#将小部件放置到主窗口中
b.pack()
#进入消息循环
top.mainloop()