title: Python Tkinter Input Box
body: <p>Good day.
  I am trying to create my own input box for use in my project.
  basically what i am trying to do is run my main form which will call the second. the user will provide some data on the second and when the press the ok/close button on the second for the data will be passed back to the first. similar in functionality to the inputbox.
  here is what i have created, but being new to python i am not sure where i am going wrong/nor can i quick figure out when to put the return.</p>
  
  <blockquote>
    <p>My Class is here</p>
  </blockquote>
  
  <hr>
  
  <pre><code>import tkinter as tk
  class MainWindow():
      def __init__(self, parent):
          top = self.top = tk.Toplevel(parent)
          self.myLabel = tk.Label(top, text='Enter a Grouping Name')
          self.myLabel.pack()
          self.myEntryBox = tk.Entry(top)
          self.myEntryBox.focus_set()
          self.myEntryBox.pack()
          self.mySubmitButton = tk.Button(top, text='OK', command=self.DestWin)
          self.mySubmitButton.pack()
      def DestWin(self):
          self.top.destroy()
  </code></pre>
  
  <hr>
  
  <blockquote>
    <p>The method to call it is here</p>
  </blockquote>
  
  <hr>
  
  <pre><code>abc=configurator.MainWindow(root)
  </code></pre>
  
  <hr>