I have imported sys
I have tried using sys.quit, again works when I run it as a python script but not as an app.
I have also tried calling root.destroy() inside the app_exit function

context: I have a button called exit which calls an app_exit function which just calls the quit function.
The python quit() and exit() functions are meant to be used in the REPL only. You need to use sys.exit() or raise SystemExit.
quit() using Tkinter not working while executing as an app using py2app. However it works when I run it a python script