title: Protocols in tkinter in Python
body: <p>I am new in Python and I want to use protocols like <code>WM_DELETE_WINDOW</code>, <code>WM_TAKE_FOCUS</code> and <code>WM_SAVE_YOURSELF</code>. I have found an example of <code>WM_DELETE_WINDOW</code> which is clear enough to understand. But I want to understand the rest two protocols. What do they do?</p>
  <pre><code>from Tkinter import *
  import tkMessageBox
  
  root = Tk()
  
  def on_closing():
      if tkMessageBox.askokcancel(&quot;Quit&quot;, &quot;Do you want to quit?&quot;):
          root.destroy()
  
  root.protocol(&quot;WM_DELETE_WINDOW&quot;, on_closing)
  
  root.mainloop()
  </code></pre>