运行如下代码后,直接弹窗,内容为:“.!entry.!entry2”,两个Entry再也无法输入内容,按钮点击也没有反应。
from tkinter import *
from tkinter.messagebox import showinfo
import hashlib
top = Tk()
def step1():
l1 = Label(top, text="第一段话")
l1.pack()
da = Entry(top, bd=5)
da.pack()
l2 = Label(top, text="第二段话")
l2.pack()
path = Entry(top, bd=5)
path.pack()
showlabel=Button(top,text="合并",command=step2(da,path))
showlabel.pack()
def step2(da,path):
l3c=str(da)+str(path)
# l3 = Label(top, text=l3c)
# l3.pack(side=LEFT)
showinfo(title="提示信息",message=l3c)
step1()
top.mainloop()