title: How to update a Frame in Tkinter in a loop?
body: <p>I'm trying to create a status bar that checks if a connection to the internet is present.</p>
  
  <p>I have imported</p>
  
  <pre><code>from multiprocessing import Process
  </code></pre>
  
  <p>and I created a function in a class:</p>
  
  <pre><code>def check_connection(self):
      while True:
          time.sleep(3)
          try:
              urllib.request.urlopen('http://216.58.192.142')
              stato_conn = Label(self.bottom_uno_frame,text="Ok connection")
              stato_conn.pack(side=RIGHT)
              stato_conn.after(1000, lambda: stato_conn.destroy())
  
          except IndexError as err:
              stato_conn = Label(self.bottom_uno_frame, text="Connection down")
              stato_conn.pack(side=RIGHT)
              stato_conn.after(1000, lambda: stato_conn.destroy())
  </code></pre>
  
  <p>Then I was trying to launch it in <code>__init__</code>:</p>
  
  <pre><code>p1 = Process(target=self.check_connection())
  p1.start()
  </code></pre>
  
  <p>But it doesn't work.</p>
  
  <p>This is my app in Tkinter. I'm trying to create a label in the bottom frame "Status bar" that checks every 3 seconds if there is a valid internet connection.</p>
  
  <p>If true label text= Connection ok, if false label text=Connection down</p>
  
  <p><a href="https://i.stack.imgur.com/6dtHj.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/6dtHj.png" alt="app in tkinter"></a></p>