我想创建一个super_function
关闭窗口的函数(我在下面调用它),记录所有写入不同的信息Entry
并将其存储在一个列表中。
这是我当前的代码:
from Tkinter import *
def super_function():
# super_function that should store Entry info
# in a list and close the window
fen1 = Tk()
entr = []
for i in range(10):
entr.append(Entry(fen1))
entr[i].grid(row=i+1)
Button(fen1, text = 'store everything in a list', command = fen1.quit).grid()
fen1.mainloop()
谢谢!