This may not be of any help to 90% of the people who read it but it's something I've always searched for and came up with nothing but finally I have the code.

This is to track the window close event ( when the user clicks the red X on the window or in general exits the window ) and also a good method to handle search boxes that are pop-ups.

Code:
import Tkinter

root = Tk()

def onClose():
    print "The Window Was Closed"

root.protocol("WM_DELETE_WINDOW", onClose) #This is the piece which tracks the window exit status

root.mainloop()
So why I needed to track if a window was closed and bind a function to the event was for a very specific search box I was creating that popped up in a new window and also needed the background ( main ) window to be disabled.

This is how I did it - going with the code above and assuming that our main windows Tk() instance's name is mainRoot:

Code:
import Tkinter

root = Tk()

mainRoot.wm_attributes("-disabled", 1") #While our new window is open set the background ( main ) window state to disabled

def onClose():
    mainRoot.wm_attributes("-disabled", 0) #enabled the window again on exit

root.protocol("WM_DELETE_WINDOW", onClose) #This is the piece which tracks the window exit status

root.mainloop()
Hope this helps anyone ever wanting to do something similar. Enjoy