Reputation: 102
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
Upvotes: 1
Views: 5913
Reputation: 15953
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")
Upvotes: 1