title: Python GUI with Tkinter and Multiple Files
body: <p>So I realized I did some beginner mistakes in my code. So I made a few steps back to the first attemps. I have an small GUI with one window. </p>
  
  <p>Now I have some questions:</p>
  
  <ol>
  <li>why does also greet has to have (self) ?</li>
  <li>how do I call (is call the right word here?) greet from another py file?</li>
  </ol>
  
  <p>Thanks in advance.</p>
  
  <pre><code>from tkinter import *
  
  class MyFirstGUI(object):
      def __init__(self, master):
          self.master = master
          master.title("A simple GUI")
  
          self.label = Label(master, text="This is our first GUI!").pack()
  
          self.greet_button = Button(master, text="Greet", command=self.greet).pack()
  
          self.close_button = Button(master, text="Close", command=self.quit).pack()
  
      def greet(self):
          print('Hello')
  
      def quit(self):
          self.master.destroy()
  
  
  root = Tk()
  my_gui = MyFirstGUI(root)
  root.mainloop()
  </code></pre>