title: Creating refreshable tkinter window without closing
body: <p>I want to make a program which runs for ever and refreshes its information every 10s.</p>
  
  <p>The best solution I got was:</p>
  
  <pre><code>while True:
  
      Gui= GUI()
      Gui.after(2000, lambda : Gui.destroy())
      Gui.mainloop()
  </code></pre>
  
  <p>But that resulted in the window closing and creating awful effect.
  Here is my code: I want to refresh the page when the json file gets modified and the window shouldn't close.</p>
  
  <pre><code>from tkinter import *
  import json
  import time
  
  def openfile():
      data = []
      d={}
      return_listas = []
      with open('test.json', 'r') as f:
          for line in f:
              data.append(json.loads(line))
  
          for item in data:
  
              d.update(item)
          f.close()
          return d
  
  class GUI(Tk):
      def __init__(self):
          self.tk = Tk()
          self.tk.wm_state('zoomed')
          self.label = {}
          self.topFrame = Frame(self.tk)
          self.topFrame.pack(side=TOP,fill=Y)
          self.task()
  
      def task(self):
          i = 0
          list = openfile()
          for ele in list:
  
              if list[ele]=="true":
                  lb = Label(self.topFrame, text=ele+"\n", fg="green",font=("Helvetica", 24))
              if list[ele]=="false":
                  lb = Label(self.topFrame, text=ele+"\n", fg="red",font=("Helvetica", 24))
              lb.pack(fill=X) 
  
              self.label[ele] = lb
  
  
          i += 1
  </code></pre>
  
  <p>UPDATE, 
  now I have problem where i can't maintain refreshable information, it either stacks up or doesn't show at all</p>