+ 4

Tkinter coding in Python

Good evening. My question relates to pythons module tkinter. I use it in my code to open a window, display text and await user input that is displayed as soon as the button is pressed. You can try it out if you have access to an IDE with tkinter. I now wonder how I can save your input into a variable and use it for anything. With my current code the input is displayed but cant be saved, and I dont know why. I would appreciate your help. https://code.sololearn.com/cuo9y3LjFrbc/?ref=app

3rd Aug 2017, 7:30 PM
JayAge
2 ответов
+ 17
there's close_well() inside retrieve_and_close() method. there's well.destroy() inside close_well() method. What's the meaning of destroy() function?
3rd Aug 2017, 9:01 PM
Adi Pratama
Adi Pratama - avatar
+ 1
you could change your retrieve-value function, so that it returns the input instead of printing. Another thing I noticed is that you import tkinter twice.
3rd Aug 2017, 10:03 PM
Amarie