title: grab_set in tkinter window
body: <p>I've seen many examples of grab_set() being used for modal windows for tkinter but I can't get it to work for my application.
  I am creating a second window as my 'Settings' window which is called from the Menu of the main application.</p>
  
  <p>example:</p>
  
  <pre><code>import tkinter as tk
  
  class Main(tk.Tk):
  
      def __init__(self,*args, **kwargs):
          tk.Tk.__init__(self,*args, *kwargs)
  
          button = tk.Button(self,text="second window", command=lambda:Settings())
          button.pack()
  
  
  class Settings(tk.Tk):
  
      def __init__(self,*args, **kwargs):
          tk.Tk.__init__(self,*args, *kwargs)
          button = tk.Button(self,text="quit", command=lambda: quit())
          button.pack()
          self.grab_set()
  
  if __name__ == "__main__":
      app = Main()
      app.mainloop()
  </code></pre>
  
  <p>Right now I can still click the 'Settings' button to create as many instances of <code>Settings</code> as the pc would allow. How do I restrict clickability to the main application window until the second one is closed first?</p>