title: Tkinter - Entry .get() from another class
body: <p>i've recently come across a problem thats bugging me with the tkinter entry .get() function, I have put together an example code so you can see what i'm trying to do, I have two classes, a class for each window. In the first window(main window) I have an entry box, in the second window I am attempting to get the entry box text from the first window.</p>
  
  <p>Here's the code: (Trying to get entry box info from the first class in the second class)</p>
  
  <pre><code>from Tkinter import *
  
  class window_1(object):
  
      def __init__(self):
          self.app = Tk()
          self.app.title("Window One")
  
      def entrybox(self):
          self.ent = Entry(self.app) #This is the text i'm trying to get in 2nd class
  
      def button(self):
          def ODV(self):
              class window_2(object):
                  def __init__(self):
                      self.app2 = Tk()
                      self.app2.title("Window Two")
  
                  def labels(self):
                      self.label_0 = Label(self.app2, text = "Name: ")
  
                  def info(self):
                      self.fetch_name = self.ent.get()#Here is my problem
  
                  def gridder(self):
                      self.label_0.grid(row = 0, column = 0)
                      self.fetch_name.grid(row = 0, column = 1)
  
              rooter = window_2()
              rooter.labels()
              rooter.info()
              rooter.gridder()
  
          open_data_viewer = lambda: ODV(self)
          self.but = Button(self.app, text = "Save", command = open_data_viewer)
  
      def packer(self):
          self.ent.pack(anchor = W)
          self.but.pack(anchor = W)
  
      def App_Runner(self):
          self.app.mainloop()
  
      root = window_1()
      root.entrybox()
      root.button()
      root.packer()
      root.App_Runner()
  </code></pre>