0
  1. I have imported sys
  2. I have tried using sys.quit, again works when I run it as a python script but not as an app.
  3. 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.

1 Answer 1

1

The python quit() and exit() functions are meant to be used in the REPL only. You need to use sys.exit() or raise SystemExit.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.