1

How to exit by clicking x in python I made some programs but when the program finishes it closes automatically There is exitonclick in turtle but i don't know if there is something like that in python but not in turtle I 'm beginner in python

2
  • Are you executing it from windows command prompt? (double clicking) Commented Jul 11, 2015 at 19:44
  • Yes I execute it from command prompt Commented Jul 11, 2015 at 19:47

1 Answer 1

1

You can do one of the two:

1) Execute the command with -i parameter

2) In your python script (at the end) add:

input("Press Enter to exit")
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.