title: How to thread with tkinter in python3 using queue?
body: <p>I'm trying to thread definitions in tkinter using queue in specifically python3</p>
  
  <p>I've had similar code in python2 work great using a similar method without queue but in python3 from what i've read tkinter doesn't allow for multithreading with gui. I found some examples that uses Queue process. They outline i'm suppose to create an Queue object, a new thread with access to that queue and check for input in the main thread</p>
  
  <pre><code>#!/usr/bin/python3
  
  from tkinter import *
  import time
  import threading
  import queue
  import subprocess
  
  def temp_sensor(queue_list):
      warning = 0
      while True:
          var = "cat /sys/class/thermal/thermal_zone*/temp"
          temp_control = subprocess.check_output([var], shell=True)
          temp_length = len(temp_control)
          temp_control = temp_control[35:]
          temp_control = temp_control[:-4]
          temp_control = int(temp_control)
          degree_sign= u'\N{DEGREE SIGN}'
          displayed_temp = "Tempature: " + str(temp_control) + degree_sign + "C"
  
          if temp_control &gt; 79:
              warning = warning + 1
              if warning == 3:
                  print ("Warning Core Tempature HOT!")
                  warning = 0
  
          if temp_control &gt; 90:
                  time.sleep(3)
                  print ("Warning EXTREMLY to HOT!!!")
  
          queue_list.put(displayed_temp)            
          time.sleep(1)
  
  class Gui(object):
      def __init__(self, queue_list):
          self.queue_list = queue_list
          self.root = Tk()
          self.root.geometry("485x100+750+475")
          main_tempature_status = StringVar(self.root)
  
          Ts = Entry(self.root, textvariable=main_tempature_status)
          Ts.pack()
          Ts.place(x=331, y=70, width=160, height=25)
          Ts.config(state=DISABLED, disabledforeground="Black")
  
          self.root.after(1000, self.read_queue)
  
      def read_queue(self):
          try:
              temp = self.queue.get_nowait()
              self.main_tempature_status.set(temp)
          except queue_list.Empty:
              pass
  
          self.root.after(1000, self.read_queue)
  
  if __name__ == "__main__":
      queue_list = queue.Queue()
  
      gui = Gui(queue_list)
      t1 = threading.Thread(target=temp_sensor, args=(queue_list,))
      t1.start()
  
      gui.root.mainloop()
  </code></pre>
  
  <p>My desired result is to run a some of these definitions to do various tasks and display their variables in the tkinter entry using python3.
  when i run my code it gives me the variable from the queue but it won't post to the GUI. please forgive my less then pythonic code.</p>