title: Python GUI - Linking one GUI in a class to another class
body: <p>What I am trying to do is to link a GUI from one class in a separate file to another. 
  My first class is a main menu which will display a few buttons that will link to another window.
  The second class displays a different window, but the problem I am having at the moment is that I don't know how to link the button in the first class to call the second class.
  Here's the code I have so far:</p>
  
  <p>First file, the main menu:</p>
  
  <pre><code>from tkinter import *
  import prac2_link
  
  
  class main:
      def __init__(self,master):
          frame = Frame(master, width=80, height=50)
          frame.pack()
          self.hello = Label(frame, text="MAIN MENU").grid()
          self.cont = Button(frame,text="Menu option 1", command=prac2_link.main2).grid(row=1)
  
  
  
  root = Tk()
  application = main(root)
  root.mainloop()
  </code></pre>
  
  <p>second file:</p>
  
  <pre><code>from tkinter import *
  
  class main2:
      def __init__(self):
          frame1 = Frame(self, width=80, height=50)
          frame1.pack()
          self.hello = Label(frame1, text="hello, its another frame").grid(row=0,column=0)
  </code></pre>