How do I bind the escape key to close this window
First of all, quit is a built-in method so I'd use another name. Otherwise, here's the function:
import sys
def close(event):
master.withdraw() # if you want to bring it back
sys.exit() # if you want to exit the entire thing
master.bind('<Escape>', close)