why does the root window keep disappearing? Check my code please. | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

why does the root window keep disappearing? Check my code please.

from tkinter import* root = Tk() entry_1 = Entry(root, width = 30) entry_2 = Entry(root, width = 30) entry_1.pack() entry_2.pack() while True: get = input('anything') If you get rid of the "while True:" loop the root window appears, but when you include it, it disappears.

3rd Nov 2017, 1:08 AM
Hyrum Harris
Hyrum Harris - avatar
1 Answer
+ 3
exactly 1) use root.mainloop() 2) you need threads the app uses an infinite loop for gui you need an infinite loop? use threads
3rd Nov 2017, 1:45 AM
Abdur-Rahmaan Janhangeer
Abdur-Rahmaan Janhangeer - avatar