Skip to content

Instantly share code, notes, and snippets.

@CSaratakij
Created August 18, 2016 17:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save CSaratakij/86b5d04952a17cc250ac87bb23ef90f5 to your computer and use it in GitHub Desktop.
Save CSaratakij/86b5d04952a17cc250ac87bb23ef90f5 to your computer and use it in GitHub Desktop.
Test Exit Turtle
#!/usr/bin/env python3
import turtle, sys
from turtle import Turtle
from turtle import Screen
class MyTurtle(Turtle):
def quit(self, btn, fun):
sys.exit()
window = Screen()
myTurtle = MyTurtle()
turtle.onclick(myTurtle.quit)
window.mainloop()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment